VLOOKUP that refers to a number as a result from a formula showing NA

NVRensburg

Board Regular
Please could I get some help. I'm using a VLOOKUP formula that uses the LOOKUP-VALUE which is a number from a result from another formula in that cell. It gives a result as NA, but if I type the number "1" in there, then it works.

The VLOOKUP formula is =VLOOKUP(L1,Sheet1!A:B,2,FALSE)

L1 formula contents is =MID(@CELL("filename",A1),FIND("]",@CELL("filename",A1))+1,255) which returns the value "1"

Please could someone assist as to how I can use the VLOOKUP formula that will work?

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

steve the fish

Well-known Member
Thats because your number is text. A textual number is not seen as the same as a real number. You could try:

=IFERROR(VLOOKUP(L1+0,Sheet1!A:B,2,FALSE),VLOOKUP(L1,Sheet1!A:B,2,FALSE))

NVRensburg

Board Regular
Thank you so much!!! That works
Thats because your number is text. A textual number is not seen as the same as a real number. You could try:

=IFERROR(VLOOKUP(L1+0,Sheet1!A:B,2,FALSE),VLOOKUP(L1,Sheet1!A:B,2,FAT

Peter_SSs

MrExcel MVP, Moderator
which is a number from a result from another formula in that cell.
If it is always going to be a number, then it would be simple to do the "+0" in the L1 formula and keep your original simple VLOOKUP formula

Excel Formula:
``=MID(@CELL("filename",A1),FIND("]",@CELL("filename",A1))+1,255)+0``
Excel Formula:
``=VLOOKUP(L1,Sheet1!A:B,2,FALSE)``

Replies
11
Views
496
Replies
9
Views
273
Replies
1
Views
47
Replies
2
Views
39
Replies
4
Views
100

1,127,121
Messages
5,622,861
Members
415,935
Latest member
kes1973

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.

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