LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 18
Default The last filled cell in a range

Thanks Bernie and Roger. I acted like such a lame duck on that one. Should've
seen that. Anyways, thanks a million. :)

Sam


"Roger Govier" wrote:

Hi Sam

I was assuming Headers in row 1, and making the Count on Column A, again
assuming that would have the maximum rows filled, even if rows weren't
completed in other columns.
to get the result you are getting, there must be something in at least 2 of
the cells A1:A7.
I guess that your header is in A7, but there is one item within A1:A6
As a result, COUNTA($A:$A) is returning a value which is correct, there is
data in all but 6 of the cells.

You would need to adjust the formula to add 6 to the value returned by
Counta.
=$A$8:INDEX($Q:$Q,COUNTA($A:$A)+6)

I tend to include the headers in my named ranges, (as I am often using the
data in Pivot Tables which require a header row as well), so I would use
=$A$7:INDEX($Q:$Q,COUNTA($A:$A)+5)
It will make no difference to your Vlookup's.

--
Regards
Roger Govier

"The Narcissist" wrote in message
...
Hi Roger,

The meeting got cancelled. I tried your suggestion. Worked fine for one
dynamic range. But for the other one, which is quite large, it somehow
ends
up not selecting the last 6 rows. The data is from cell A8 to Q8425.
Although
currently, only columns A thru E are populated right through to row 8425.
I
defined a range called DATARANGE that refers to

=$A$8:INDEX($Q:$Q,COUNTA($A:$A))

When I type DATARANGE in the address box, it selects all cells from A8
thru
Q8419. Any thoughts as to why this might be happening?

Thanks,

Sam




"Roger Govier" wrote:

Hi Sam

Create a Dynamic named range.
Supposing your data is in cells A1 through M500 at present, and you will
be
continually adding new rows.
InsertNameDefineName MyData Refers to
=$A$1:INDEX($M:$M,COUNTA($A:$A))

Then your Vlookup formula will become
=VLOOKUP(cell,myData,x,0)
where cell is the cell address for your present lookup value, and x is
the
offset that you use at present.

--
Regards
Roger Govier

"The Narcissist" wrote in
message
...
Hi Everyone,

I'm working on some HR reports on Excel. The raw employee data is kept
in
one sheet and I pull out information from that sheet using VLookup by
looking
up the employee code. However, the employee count keeps changing on a
regular
basis. To make sure that the vlookup function goes through the entire
data, I
have kept all rows till 65536 in the data range. This makes the reports
very
slow. Is there any other way to ensure that the entire data is looked
into
without me having to change the range in the vlookup function everytime
there
is an addition or deletion in the raw data? I mean to ask if there is
any
function that returns the last filled cell in a range?

Any help would be greatly appreciated.

Thanks,

Sam


 
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
Filled cells dont appear as filled SMILLS Excel Discussion (Misc queries) 6 October 18th 07 05:28 PM
Set cell to record date when adjacent cell is filled AND NOT RESET The new guy Excel Worksheet Functions 3 February 26th 07 06:11 PM
Count filled colour in cell in given range [email protected] Excel Discussion (Misc queries) 2 May 16th 06 10:18 AM
how use range to bottom of filled cells? Ian Elliott Excel Worksheet Functions 1 November 14th 05 07:29 PM
Counting blank and filled cells within a range. greg7468 Excel Discussion (Misc queries) 3 June 28th 05 10:41 PM


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