简体   繁体   English

Excel部分从右到左查找电话号码

[英]Excel Partial Look Up Of Phone Number Right To Left

I've been trying to write a number look up formula to see if some thing exists. 我一直试图写一个数字查找公式,看是否存在某些东西。 Ideally for example looking at say xxxxxxx and then looking to match the last 8 chars from the reference value (ie xxxxx) as there are a multiple number of formats. 理想情况下,例如查看xxxxxxx,然后查找匹配参考值(即xxxxx)中的最后8个字符,因为存在多种格式。

Using the following which I have modded from an working formula as an exact match I've tried to specify how many chars to look at how ever Excel keeps telling me I have too many arguments. 使用以下我从工作公式中修改的以下内容作为完全匹配项,我试图指定要查看的字符数,Excel告诉我的参数太多了。 I've tried a few different ways to apply this using the example "=MATCH(" "&LEFT($A8,5)&" ",'Number'!$G:$G,0)" but with no luck. 我尝试使用示例“ = MATCH(“ ”&LEFT($ A8,5)&“ ”,'Number'!$ G:$ G,0)“尝试几种不同的方法来应用此方法,但是没有运气。

=IFERROR(IF(MATCH("*"&LEFT($A8,'Number'!$G:$G,8),"Yes",),"No"))

Any suggestions ? 有什么建议么 ?

Thanks 谢谢

Terran 人族

You can use LOOKUP like below: 您可以使用如下所示的LOOKUP:

=IF(ISNA(LOOKUP(2^15,FIND(RIGHT(A8,8),G:G,1))),"No","Yes")

Or MATCH as you want: 或根据需要匹配:

=IF(ISNA(MATCH("*"&RIGHT(A8,8)&"*",G:G,0)),"No","Yes")

Edit: Changed formulas for differing sheet. 编辑:更改了不同工作表的公式。

=IF(ISNA(LOOKUP(2^15,FIND(RIGHT(A8,8),'Number M'!G:G,1))),"No","Yes"

=IF(ISNA(MATCH("*"&RIGHT(A8,8)&"*",'Number M'!G:G,0)),"No","Yes"

Noticed one thing and which might be case with you. 注意到一件事,您可能会遇到这种情况。

If suppose A8 has 302111983588 and 'Number M'!G:G also contains this as exact value then second formula having MATCH fails but LOOKUP works as intended. 如果假定A8具有302111983588并且'Number M'!G:G也包含此值作为精确值,则具有MATCH第二个公式将失败,但LOOKUP按预期工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM