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

NVRensburg

Board Regular
Joined
Jul 1, 2014
Messages
88
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
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?
 

Some videos you may like

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
Joined
Oct 20, 2009
Messages
8,387
Office Version
  1. 365
Platform
  1. Windows
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
Joined
Jul 1, 2014
Messages
88
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
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
Joined
May 28, 2005
Messages
48,375
Office Version
  1. 365
Platform
  1. Windows
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)
 

Watch MrExcel Video

Forum statistics

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