+ Reply to Thread
Results 1 to 21 of 21

VLOOKUP coming back as #N/A (some of the time)

  1. #1
    Registered User
    Join Date
    01-08-2016
    Location
    London
    MS-Off Ver
    2012
    Posts
    23

    VLOOKUP coming back as #N/A (some of the time)

    Hi,

    Here is the vlookup:

    =VLOOKUP(RANDBETWEEN(1,10),'Formula Data'!$AD$5:$AE$14,2,FALSE)&" with "&VLOOKUP(RANDBETWEEN(1,47),'Formula Data'!$AB$5:$AC$51,2,FALSE)&" facing a "&VLOOKUP(RANDBETWEEN(1,10),'Formula Data'!$AF$5:$AG$14,2,FALSE)&" open from a "&VLOOKUP(RANDBETWEEN(1,6),'Formula Data'!AH5:AI10,2,FALSE)

    It says the bolded part is volatile, but I cannot find why that is?

    Any help is appreciated!!

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: VLOOKUP coming back as #N/A (some of the time)

    VLOOKUP coming back as #N/A (some of the time)
    this means the value you want to find is Not Available (N/A) in the VLookup table.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Registered User
    Join Date
    01-08-2016
    Location
    London
    MS-Off Ver
    2012
    Posts
    23

    Re: VLOOKUP coming back as #N/A (some of the time)

    Quote Originally Posted by oeldere View Post
    this means the value you want to find is Not Available (N/A) in the VLookup table.
    Hi,

    I have triple checked this and I am 100% sure it is, please see the below picture (sorry about the quality/format):

    https://gyazo.com/fc7fb4569aff29e56bf53ba2ba4b1838

    The picture displays the vlookup table

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: VLOOKUP coming back as #N/A (some of the time)

    Pictures usually aren't very helpful because we can't copy/paste your data into our own workbooks for troubleshooting.

    Can you attach an actual workbook to this thread?

  5. #5
    Registered User
    Join Date
    01-08-2016
    Location
    London
    MS-Off Ver
    2012
    Posts
    23

    Re: VLOOKUP coming back as #N/A (some of the time)

    How do I attach it?

  6. #6
    Registered User
    Join Date
    01-08-2016
    Location
    London
    MS-Off Ver
    2012
    Posts
    23

    Re: VLOOKUP coming back as #N/A (some of the time)

    I have clicked "go advance" and clicked on the paperclip image to try and attach it, but nothing happens.

  7. #7
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: VLOOKUP coming back as #N/A (some of the time)

    After 'Go Advanced', Instead of the paperclip, look down below for 'Manage Attachments'

  8. #8
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: VLOOKUP coming back as #N/A (some of the time)

    When I clicked that link my machine froze!

    I had to disconnect the power source then reconnect to regain control!
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  9. #9
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,207

    Re: VLOOKUP coming back as #N/A (some of the time)

    Scroll down to "Manage Attachments": "Paper Clip" does not work!

  10. #10
    Registered User
    Join Date
    01-08-2016
    Location
    London
    MS-Off Ver
    2012
    Posts
    23

    Re: VLOOKUP coming back as #N/A (some of the time)

    Hehe, sorry for my newbieness; I am new to this forum!

    It should be done now!
    Attached Files Attached Files

  11. #11
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: VLOOKUP coming back as #N/A (some of the time)

    Quote Originally Posted by Clanty View Post
    Hi,

    Here is the vlookup:

    =VLOOKUP(RANDBETWEEN(1,10),'Formula Data'!$AD$5:$AE$14,2,FALSE)&" with "&VLOOKUP(RANDBETWEEN(1,47),'Formula Data'!$AB$5:$AC$51,2,FALSE)&" facing a "&VLOOKUP(RANDBETWEEN(1,10),'Formula Data'!$AF$5:$AG$14,2,FALSE)&" open from a "&VLOOKUP(RANDBETWEEN(1,6),'Formula Data'!AH5:AI10,2,FALSE)

    It says the bolded part is volatile, but I cannot find why that is?

    Any help is appreciated!!
    The RANDBETWEEN function is volatile.

    You don't actually need to have those numbers in the look table. You can do the same thing using the INDEX function.

    For example:

    =INDEX(AE5:AE14,RANDBETWEEN(1,10))...

  12. #12
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: VLOOKUP coming back as #N/A (some of the time)

    P.S.

    And using INDEX will eliminate any #N/A errors generated by VLOOKUP.

    Cha ching!

  13. #13
    Registered User
    Join Date
    01-08-2016
    Location
    London
    MS-Off Ver
    2012
    Posts
    23

    Re: VLOOKUP coming back as #N/A (some of the time)

    I have never used the INDEX function, what does it do?

    Also, the vlookup+randbetween combo work fine with the other entries earlier in the function, so why is the last one volatile, but the others OK?

    Thanks

  14. #14
    Registered User
    Join Date
    01-08-2016
    Location
    London
    MS-Off Ver
    2012
    Posts
    23

    Re: VLOOKUP coming back as #N/A (some of the time)

    Hi,

    Using the INDEX function still returns errors....

  15. #15
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: VLOOKUP coming back as #N/A (some of the time)

    I would assume it has something to do with the Floating Point Precision, causing the result of randbetween to not be an EXACT Whole value matching with the numbers in the lookup tables.

    Try adding ROUND to each of the randbetween functions
    ROUND(RANDBETWEEN(1,10),0)

  16. #16
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: VLOOKUP coming back as #N/A (some of the time)

    Quote Originally Posted by Clanty View Post
    I have never used the INDEX function, what does it do?
    Basically, it does the same thing that VLOOKUP does but it's more versatile.

    Also, the vlookup+randbetween combo work fine with the other entries earlier in the function, so why is the last one volatile, but the others OK?
    Every instance of RANDBETWEEN is volatile, not just the last one.

    Here's how you can use INDEX in this application:

    =INDEX('Formula Data'!$AE$5:$AE$14,RANDBETWEEN(1,10))&" with "&INDEX('Formula Data'!$AC$5:$AC$51,RANDBETWEEN(1,47))&" facing a "&INDEX('Formula Data'!$AG$5:$AG$14,RANDBETWEEN(1,10))&" open from a "&INDEX('Formula Data'!AI5:AI10,RANDBETWEEN(1,6))

  17. #17
    Registered User
    Join Date
    01-08-2016
    Location
    London
    MS-Off Ver
    2012
    Posts
    23

    Re: VLOOKUP coming back as #N/A (some of the time)

    Quote Originally Posted by Jonmo1 View Post
    I would assume it has something to do with the Floating Point Precision, causing the result of randbetween to not be an EXACT Whole value matching with the numbers in the lookup tables.

    Try adding ROUND to each of the randbetween functions
    ROUND(RANDBETWEEN(1,10),0)
    Hi,

    This is not it, as 90% of the returns would result in errors, and I use this formula combo regularly without issue.

  18. #18
    Registered User
    Join Date
    01-08-2016
    Location
    London
    MS-Off Ver
    2012
    Posts
    23

    Re: VLOOKUP coming back as #N/A (some of the time)

    Quote Originally Posted by Tony Valko View Post
    Here's how you can use INDEX in this application:

    =INDEX('Formula Data'!$AE$5:$AE$14,RANDBETWEEN(1,10))&" with "&INDEX('Formula Data'!$AC$5:$AC$51,RANDBETWEEN(1,47))&" facing a "&INDEX('Formula Data'!$AG$5:$AG$14,RANDBETWEEN(1,10))&" open from a "&INDEX('Formula Data'!AI5:AI10,RANDBETWEEN(1,6))
    YAHOOOO, thanks!!!

    If you don't mind, can you explain why this works and the vlookup doesn't? Thanks again!

  19. #19
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: VLOOKUP coming back as #N/A (some of the time)

    Quote Originally Posted by Clanty View Post
    I have never used the INDEX function, what does it do?
    Basically, it does the same thing as VLOOKUP but is more versatile.

    Also, the vlookup+randbetween combo work fine with the other entries earlier in the function, so why is the last one volatile, but the others OK?
    Every instance of RANDBETWEEN is volatile, not just the last one.

    Here's a small sample file that demonstrates essentially what you're wanting to do.

    Press function key F9 to generate a new result.
    Attached Files Attached Files

  20. #20
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: VLOOKUP coming back as #N/A (some of the time)

    AF10 on the Formula Data sheet = 3, but it seems you want that to be a 6.

  21. #21
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: VLOOKUP coming back as #N/A (some of the time)

    Quote Originally Posted by Clanty View Post
    If you don't mind, can you explain why this works and the vlookup doesn't?
    I'd have to look at your file but I'm kind of leery to download it seeing as what happened when I tried to look at your screencap.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] IF AND Functions coming back as False
    By Tordah in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-03-2015, 05:22 PM
  2. Replies: 1
    Last Post: 11-08-2013, 10:37 PM
  3. VLOOKUP Formula coming back with NA#
    By monza2 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 10-18-2012, 01:38 AM
  4. Macro coming back with Run Time Error
    By amasulli in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-14-2012, 10:44 AM
  5. Web Query Coming Back Blank In Excel 2010
    By adam1230 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-28-2011, 03:56 AM
  6. [SOLVED] emailed docs coming back in different format
    By JL Adamson in forum Excel General
    Replies: 0
    Last Post: 10-05-2005, 12:05 PM
  7. Replies: 1
    Last Post: 06-03-2005, 02:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1