Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
zerOman
 
Posts: n/a
Default Can vlookup find the last row without it in the formula?

Hello, hope someone can assist me.

Ive taken over a task that uses the following formula in an Excel
spreadsheet:
=VLOOKUP(B5-10001,$B$2:$B$2064,1,TRUE)
The formula compares the value in an adjacent cell to all other values in
cells in the same column. The values in the cells are =10000 and in no
specific order.

Originally the spreadsheet probably had 2064 rows and although the number of
records (rows) will always increase, my predecessors never updated the bottom
row (2064) in the formula. I noticed this error as I hadnt used vlookup
much and was looking at the logic.

I can change the row number each time I update the spreadsheet or I guess
that I could have a used value like 10000 in cells below the last record to
say 3,000 and have 3,000 in the formula.

Is there a better way€¦ Perhaps a function that can be used instead of the
bottom row number that recognises when it has reached the bottom row?

Thanks

  #2   Report Post  
Posted to microsoft.public.excel.misc
Biff
 
Posts: n/a
Default Can vlookup find the last row without it in the formula?

Hi!

You can use a dynamic range:

http://contextures.com/xlNames01.html#Dynamic

Biff

"zerOman" wrote in message
...
Hello, hope someone can assist me.

I've taken over a task that uses the following formula in an Excel
spreadsheet:
=VLOOKUP(B5-10001,$B$2:$B$2064,1,TRUE)
The formula compares the value in an adjacent cell to all other values in
cells in the same column. The values in the cells are =10000 and in no
specific order.

Originally the spreadsheet probably had 2064 rows and although the number
of
records (rows) will always increase, my predecessors never updated the
bottom
row (2064) in the formula. I noticed this error as I hadn't used vlookup
much and was looking at the logic.

I can change the row number each time I update the spreadsheet or I guess
that I could have a used value like 10000 in cells below the last record
to
say 3,000 and have 3,000 in the formula.

Is there a better way. Perhaps a function that can be used instead of the
bottom row number that recognises when it has reached the bottom row?

Thanks



  #3   Report Post  
Posted to microsoft.public.excel.misc
JB
 
Posts: n/a
Default Can vlookup find the last row without it in the formula?


=VLOOKUP(B5-10001,Offset($B$2,,,CountA(B:B)-1,1),1,TRUE)

Cordialy JB

zerOman a écrit :

Hello, hope someone can assist me.

I've taken over a task that uses the following formula in an Excel
spreadsheet:
=VLOOKUP(B5-10001,$B$2:$B$2064,1,TRUE)
The formula compares the value in an adjacent cell to all other values in
cells in the same column. The values in the cells are =10000 and in no
specific order.

Originally the spreadsheet probably had 2064 rows and although the numberof
records (rows) will always increase, my predecessors never updated the bottom
row (2064) in the formula. I noticed this error as I hadn't used vlookup
much and was looking at the logic.

I can change the row number each time I update the spreadsheet or I guess
that I could have a used value like 10000 in cells below the last record to
say 3,000 and have 3,000 in the formula.

Is there a better way... Perhaps a function that can be used instead of the
bottom row number that recognises when it has reached the bottom row?

Thanks


  #4   Report Post  
Posted to microsoft.public.excel.misc
zerOman
 
Posts: n/a
Default Can vlookup find the last row without it in the formula?

Thanks to both of you. The link to the web site will also be useful.
I can't see any buttons to rate?

"JB" wrote:


=VLOOKUP(B5-10001,Offset($B$2,,,CountA(B:B)-1,1),1,TRUE)

Cordialy JB

zerOman a écrit :

Hello, hope someone can assist me.

I've taken over a task that uses the following formula in an Excel
spreadsheet:
=VLOOKUP(B5-10001,$B$2:$B$2064,1,TRUE)
The formula compares the value in an adjacent cell to all other values in
cells in the same column. The values in the cells are =10000 and in no
specific order.

Originally the spreadsheet probably had 2064 rows and although the number of
records (rows) will always increase, my predecessors never updated the bottom
row (2064) in the formula. I noticed this error as I hadn't used vlookup
much and was looking at the logic.

I can change the row number each time I update the spreadsheet or I guess
that I could have a used value like 10000 in cells below the last record to
say 3,000 and have 3,000 in the formula.

Is there a better way... Perhaps a function that can be used instead of the
bottom row number that recognises when it has reached the bottom row?

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, SUM, OFFSET and IF formula all at once redb Excel Discussion (Misc queries) 1 February 15th 06 03:20 PM
FIND FORMULA SIMILAR TO VLOOKUP FOR NON-ASCENDING VALUES Kir Excel Worksheet Functions 2 November 10th 05 09:39 PM
Vlookup formula Excel version 2002 biz Excel Discussion (Misc queries) 0 September 7th 05 01:07 AM
Vlookup formula Amnon Wilensky Excel Worksheet Functions 4 May 7th 05 02:59 PM
How do I use Range Names listed in a VLookup table in a formula? Essbasedvlpr32 Excel Worksheet Functions 3 December 15th 04 10:11 PM


All times are GMT +1. The time now is 11:05 AM.

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"