Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Weird behavior of VLOOKUP

I have a VLOOKUP statement that works flawlessly until you get to a certain
place in the table. The VLOOKUP statement is as follows:

=IF(ISBLANK(DATABASE!$A82),"",VLOOKUP(DATABASE!$A8 2,JobInfo,1))

I have a range called 'JobInfo' that is defined as =DATABASE!$A$11:$BQ$85

The problem is the result of the VLOOKUP statement gives the wrong
information. The VLOOKUP statement is located on a sheet called 'Details' on
line 175. Similar VLOOKUP statements start on line 103 of that sheet and go
through line 235. The result of the VLOOKUP statement correct through line
174. The results for lines 175 and 176 repeat the same information from line
173. Lines 177 through 235 are blank. When I evaluate the formula, I get
the following sequence:


IF(ISBLANK(1249),"",VLOOKUP(DATABASE!$A82,JobInfo, 1))
IF(FALSE),"",VLOOKUP(DATABASE!$A82,JobInfo,1))
IF(FALSE),#N/A,VLOOKUP(1249,JobInfo,1))
IF(FALSE),#N/A,VLOOKUP(1249,DATABASE!$A$11:$BQ$85,1))
IF(FALSE),#N/A,1247)
1247

Note that it correctly identifies the contents of A82 as '1249' (which has
the offset of 1 in the VLOOKUP table), but when it goes to perform the
VLOOKUP, it selects the contents of the cell that is two rows above it.

The exact same thing happens with line 176. It chooses the contents from
three lines above it.

Any clue why this may be happening?

If have deleted the range name and recreated it with no success.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default Weird behavior of VLOOKUP

John
is your list in jobInfo definitely sorted on column A?
You may be better using the 4 argument version of VLOOKUP (for exact
matches), certainly try it to see if it fixes your problem. (add a FALSE
after your 1)
Or re-sort your JobInfo table and promise to add new entries in the right row

cheers
Simon

"John Simons" wrote:

I have a VLOOKUP statement that works flawlessly until you get to a certain
place in the table. The VLOOKUP statement is as follows:

=IF(ISBLANK(DATABASE!$A82),"",VLOOKUP(DATABASE!$A8 2,JobInfo,1))

I have a range called 'JobInfo' that is defined as =DATABASE!$A$11:$BQ$85

The problem is the result of the VLOOKUP statement gives the wrong
information. The VLOOKUP statement is located on a sheet called 'Details' on
line 175. Similar VLOOKUP statements start on line 103 of that sheet and go
through line 235. The result of the VLOOKUP statement correct through line
174. The results for lines 175 and 176 repeat the same information from line
173. Lines 177 through 235 are blank. When I evaluate the formula, I get
the following sequence:


IF(ISBLANK(1249),"",VLOOKUP(DATABASE!$A82,JobInfo, 1))
IF(FALSE),"",VLOOKUP(DATABASE!$A82,JobInfo,1))
IF(FALSE),#N/A,VLOOKUP(1249,JobInfo,1))
IF(FALSE),#N/A,VLOOKUP(1249,DATABASE!$A$11:$BQ$85,1))
IF(FALSE),#N/A,1247)
1247

Note that it correctly identifies the contents of A82 as '1249' (which has
the offset of 1 in the VLOOKUP table), but when it goes to perform the
VLOOKUP, it selects the contents of the cell that is two rows above it.

The exact same thing happens with line 176. It chooses the contents from
three lines above it.

Any clue why this may be happening?

If have deleted the range name and recreated it with no success.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Weird behavior of VLOOKUP

Simon:
After posting my original message, I went back to a previous version of
the spreadsheet that 'worked'. I realized that the first column was
originally in ascending order, but changes were made to the last two entries
that made it out of order. We resorted the table and viola! it works.
Thanks for the tip, but we had already figured it out!

John

"Simon Murphy" wrote:

John
is your list in jobInfo definitely sorted on column A?
You may be better using the 4 argument version of VLOOKUP (for exact
matches), certainly try it to see if it fixes your problem. (add a FALSE
after your 1)
Or re-sort your JobInfo table and promise to add new entries in the right row

cheers
Simon

"John Simons" wrote:

I have a VLOOKUP statement that works flawlessly until you get to a certain
place in the table. The VLOOKUP statement is as follows:

=IF(ISBLANK(DATABASE!$A82),"",VLOOKUP(DATABASE!$A8 2,JobInfo,1))

I have a range called 'JobInfo' that is defined as =DATABASE!$A$11:$BQ$85

The problem is the result of the VLOOKUP statement gives the wrong
information. The VLOOKUP statement is located on a sheet called 'Details' on
line 175. Similar VLOOKUP statements start on line 103 of that sheet and go
through line 235. The result of the VLOOKUP statement correct through line
174. The results for lines 175 and 176 repeat the same information from line
173. Lines 177 through 235 are blank. When I evaluate the formula, I get
the following sequence:


IF(ISBLANK(1249),"",VLOOKUP(DATABASE!$A82,JobInfo, 1))
IF(FALSE),"",VLOOKUP(DATABASE!$A82,JobInfo,1))
IF(FALSE),#N/A,VLOOKUP(1249,JobInfo,1))
IF(FALSE),#N/A,VLOOKUP(1249,DATABASE!$A$11:$BQ$85,1))
IF(FALSE),#N/A,1247)
1247

Note that it correctly identifies the contents of A82 as '1249' (which has
the offset of 1 in the VLOOKUP table), but when it goes to perform the
VLOOKUP, it selects the contents of the cell that is two rows above it.

The exact same thing happens with line 176. It chooses the contents from
three lines above it.

Any clue why this may be happening?

If have deleted the range name and recreated it with no success.

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
Weird Links Behavior Jon Oakdale Links and Linking in Excel 5 November 13th 08 08:44 AM
weird macro behavior Dave F Excel Discussion (Misc queries) 0 November 30th 06 03:35 PM
Weird worksheet saving behavior siouxland Excel Discussion (Misc queries) 0 October 12th 06 02:22 PM
Excel weird behavior [email protected] Excel Discussion (Misc queries) 4 May 25th 06 08:23 PM
Weird template/macro behavior ?? David Excel Programming 0 August 12th 03 04:33 PM


All times are GMT +1. The time now is 09:31 PM.

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

About Us

"It's about Microsoft Excel"