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

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

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
54,259
Office Version
  1. 365
Platform
  1. Windows
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)))
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,486
Messages
5,831,968
Members
430,099
Latest member
rdhoy

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
Top