Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Ian Elliott
 
Posts: n/a
Default how use range to bottom of filled cells?

In VB, there is a way to specify a range to the bottom of filled cells:
.....Range("A65536").End(xlUp).Address
Is there something like that in the worksheet functions?
I have a cell that has this command:
=IF(ISERROR(VLOOKUP($B62,'91
SCTB'!$C$2:$D$570,2,FALSE))=FALSE,VLOOKUP($B62,'91
SCTB'!$C$2:$D$570,2,FALSE),"NO MATCH")
And it's kinda ugly, I know, but I want to change the $D$570 to something
like the above, where it just searches down to the bottom of the filled
cells. The area changes every now and then, and I want it so the search will
work even though the user (me or someone else) forgot to change the range in
the above function.
I guess I could do 65536, but I was wondering if there was something more
cleaner.
Thanks alot.

  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default how use range to bottom of filled cells?

=IF(NOT(ISERROR(VLOOKUP($B62,INDIRECT("'91
SCTB'!C2:D"&MAX(IF(ISBLANK($D$1:$D$65535),0,ROW($D $1:$D$65535)))),2,FALSE)))
,VLOOKUP($B62,INDIRECT("'91
SCTB'!C2:D"&MAX(IF(ISBLANK($D$1:$D$65535),0,ROW($D $1:$D$65535)))),2,FALSE),"
NO MATCH")

it is an array formuila, so commit with Ctrl-Shift-Enter

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Ian Elliott" wrote in message
...
In VB, there is a way to specify a range to the bottom of filled cells:
....Range("A65536").End(xlUp).Address
Is there something like that in the worksheet functions?
I have a cell that has this command:
=IF(ISERROR(VLOOKUP($B62,'91
SCTB'!$C$2:$D$570,2,FALSE))=FALSE,VLOOKUP($B62,'91
SCTB'!$C$2:$D$570,2,FALSE),"NO MATCH")
And it's kinda ugly, I know, but I want to change the $D$570 to something
like the above, where it just searches down to the bottom of the filled
cells. The area changes every now and then, and I want it so the search

will
work even though the user (me or someone else) forgot to change the range

in
the above function.
I guess I could do 65536, but I was wondering if there was something more
cleaner.
Thanks alot.



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
how to format only specific characters or numbers within each cellwithin a range of cells Colleen Excel Discussion (Misc queries) 4 September 12th 05 10:04 PM
how to format only a specific character or number in each cell withina range of cells Colleen Excel Worksheet Functions 1 September 12th 05 05:44 PM
Counting Occurrence of Text within Text in Cells in Range. Jeremy N. Excel Worksheet Functions 1 September 8th 05 05:16 AM
Counting empty cells within a range of cells Rosehill - ExcelForums.com New Users to Excel 2 May 2nd 05 08:53 AM
Counting empty cells within a range of cells Rosehill - ExcelForums.com New Users to Excel 0 April 7th 05 12:47 AM


All times are GMT +1. The time now is 09:57 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"