[Solved] Err:502 VLOOKUP

Discuss the spreadsheet application
Post Reply
User avatar
kestrel
Posts: 19
Joined: Mon Dec 19, 2022 6:28 pm

[Solved] Err:502 VLOOKUP

Post by kestrel »

I am trying to populate a field using the lookup function and continue to get an err:502 error. I have tried different things to fix. I am missing something but unable to figure out what.

When I use the Vlookup in column B of the spreadsheet it works fine:

=IF(ISBLANK (A17);"";VLOOKUP(A17;'Drop Down'.$A$7:$B$11;COLUMN();0))

When I copy the function to column D and use column C to check it gives me the 502 error:

=IF(ISBLANK (c17);"";VLOOKUP(c17;'Drop Down'.$A$7:$B$11;COLUMN();0))

Any help would be much appreciated.
Last edited by MrProgrammer on Tue Dec 20, 2022 9:07 pm, edited 2 times in total.
Reason: Vlookup → VLOOKUP
Open Office 4.1.6 Mac OS High Sierra 10.13.6
FJCC
Moderator
Posts: 9640
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Err:502 Vlookup

Post by FJCC »

Code: Select all

=IF(ISBLANK (c17);"";VLOOKUP(c17;'Drop Down'.$A$7:$B$11;COLUMN();0))
When the formula is in column D, COLUMN() returns 4. Your lookup array only has two columns.Try

Code: Select all

=IF(ISBLANK (c17);"";VLOOKUP(c17;'Drop Down'.$A$7:$B$11;2;0))
Why are you using COLUMN()?
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
User avatar
kestrel
Posts: 19
Joined: Mon Dec 19, 2022 6:28 pm

Re: Err:502 Vlookup

Post by kestrel »

Thanks for the suggestion was able to get it to work.

Not sure why I used column (), I am revisiting the spreadsheet that I had created a couple of years ago. I might of asked for help back then and this was suggested.

Thanks again.
Open Office 4.1.6 Mac OS High Sierra 10.13.6
Post Reply