help with excel formula

nathan663

Board Regular
Joined
Dec 3, 2008
Messages
153
I am trying to do a vlookup formula. I have 2 columns of data. the first is a column of 6 digit numbers. The second is a column of sixdigit numbers followed by -1.

for example. in column A i may have 123456, and in column B i may have 123456-1

I need a vlookup that ignores the -1 (it is not always -1, it could be -2, -3, -4 etc.)

this is what i tried... but it failed... any ideas?

=IF(ISNA(VLOOKUP(A2,(LEFT(6)),C:D,2)),"No Match",(VLOOKUP(A2,(LEFT(6)),C:D,2)))
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Not sure what column B has to do with the problem since it is not referred to in the formula. You may need to more carefully explain your data and layout. So this is a pure guess:

=IF(ISNA(VLOOKUP(LEFT(A2,6)+0,C:D,2,0)),"No Match",(VLOOKUP(LEFT(A2,6)+0,C:D,2,0)))
 
Upvote 0

Forum statistics

Threads
1,222,900
Messages
6,168,926
Members
452,227
Latest member
sam1121

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