# help with excel formula

#### nathan663

##### Board Regular
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

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
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)))

Replies
2
Views
253
Replies
4
Views
253
Replies
6
Views
182
Replies
4
Views
383
Replies
2
Views
315

1,218,808
Messages
6,144,604
Members
450,557
Latest member
Lahoya

### 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.

### Which adblocker are you using?

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

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