LOOKUP(1E+100, SEARCH.... issue

okiedokie2017

New Member
Joined
Sep 14, 2017
Messages
14
Hi,

Im having a problem with the spreadsheet I am working on. I thought everything is working perfectly, until I noticed some issues where the formula is not pulling the correct data I was looking for.

So I have a database with a column "Destination prefix" and another column for list price.
I have a calculator where you can put any phone number (with the correct prefix) and the formula will gives you the prefix for the phone number, and hence you can vlookup the prefix to get the list price.

My database has around 50,000 rows, but I found out that the formula is not working well with any prefix starts with "1". If I have the prefix of Dominician Republic with the prefix of "1829757", the formula will only recognize the prefix of "1", which is US prefix.

I attached a sample excel to make it clearer.

The formula I used is:
=IFERROR(LOOKUP(1E+100,SEARCH($C$2:$C$48963,LEFT(G5,$C$2:$C$48963)),$C$2:$C$48963),"")

When the formula is used on a small database, everything works. But when I used on my spreadsheet, it formula is mixing up the prefixes that start with 1 again.

Any suggestion would be much appreciated
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

Forum statistics

Threads
1,213,536
Messages
6,114,208
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top