Vlookup problem

howard

Well-known Member
Joined
Jun 26, 2006
Messages
6,601
Office Version
  1. 2021
Platform
  1. Windows
I have used the following Vlookup formula to lookup an old acount number in col A and to give me the new account number. It gives me a zero

=IF(ISNA(VLOOKUP(A3,'[M_NECPE 1011.xls]TB CONSOLIDATION'!$F:$G,2,FALSE)),0,VLOOKUP(A3,'[M_NECPE 1011.xls]TB CONSOLIDATION'!$F:$G,2,FALSE))

However, it I put a ' in front of the number, the formula then gives me the correct result i.e the new acc # equivalent which is looked up from another workbook

I would like to amend the formula so that I do not have to put an ' in from of every account number in Col A

Your assistance in this regard will be most appreciated

Sales COS Account Numbers.xls
ABCD
1NVSales
2OldAcc#NewAcc#
33000TB CONSOLIDATION'!$F:$G,2,FALSE)),0,VLOOKUP(A3,'[M_NECPE 1011.xls]TB CONSOLIDATION'!$F:$G,2,FALSE))]0
430010
530020
630030
730040
830050
930060
1030070
1130080
NV Sales
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Try this:
VLOOKUP(TEXT(A3,0),.......)
or
VLOOKUP(--A3,.......)
or
VLOOKUP(A3*1,.......)
 
Upvote 0

Forum statistics

Threads
1,224,551
Messages
6,179,476
Members
452,915
Latest member
hannnahheileen

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