Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 395
Default Odd VLOOKUP Error

Vlookup requires data to be sorted- so if your values are not in order, it
will return the first one that 'exceeds' your search value.

To only return exact values, change your formula to:
=IF(A9="","",VLOOKUP(A9,AttendanceTable,4,False))
or
=IF(A9="","",VLOOKUP(A9,AttendanceTable,4,0))

Which will force it to only return a value when an exact match for A9 is
located.

Note that if the value in A9 shows up multiple times in your lookup table,
it will only return the first match it finds.

HTH,
Keith

"TheDrescher" wrote:

Hey all, I'm running into an issue with a workbook that uses VLOOKUP to
display data on a front sheet using arrays found in other sheets based on a
selection made in Cell A9. The code I use is:
=IF(A9="","",VLOOKUP(A9,AttendanceTable,4))
The problem I am experiencing is random rows are not pulling the correct
data. This does not happen in every row, but a seemingly random selection of
them. Instead of pulling the data from the row with the correct A9 data in
them, it pulls from the row above. Is there something I'm doing wrong here?
Thanks!

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VLOOKUP error #NAME bderek95 Excel Discussion (Misc queries) 2 May 20th 10 05:27 PM
VLOOKUP #N/A Error NM Excel Worksheet Functions 7 November 13th 08 09:41 PM
vlookup error Vlookup not accurate Excel Discussion (Misc queries) 9 October 5th 06 04:06 PM
vlookup error Vlookup not accurate Excel Discussion (Misc queries) 0 October 4th 06 06:21 PM
vlookup error na# Leigh Ann Excel Worksheet Functions 1 May 23rd 05 10:50 PM


All times are GMT +1. The time now is 01:45 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"