RE: What does this do?
- From: "Jim Thomlinson" <jamest@xxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 22 Aug 2005 08:36:47 -0700
the rows.ccount returns the number of rows in the spreadsheet (65,536). The
..end(xlUp) travels up from this row to the first non-blank cell. Personally
(and this is a personal preference) I would write that line like this...
lEndRow = wbkNewHdr.Sheets("Macro Records").Range("B65536") _
..End(xlUp).Row
because in my opionion
Range("B65536") is far more clear to read than Cells(Rows.Count, 2)
--
HTH...
Jim Thomlinson
"davegb" wrote:
> I got some help here writing some code. I'm trying to do something very
> similar to what this line does, but I don't understand this line.
>
> lEndRow = wbkNewHdr.Sheets("Macro Records").Cells(Rows.Count, 2) _
> .End(xlUp).Row
>
> I know it defines the final row in the named worksheet. What I don't
> understand is what the .Count does, or why the xlUp is not a xlDown.
> Can someone explain this line for me?
> Thanks!
>
>
.
- Follow-Ups:
- Re: What does this do?
- From: Tom Ogilvy
- Re: What does this do?
- References:
- What does this do?
- From: davegb
- What does this do?
- Prev by Date: Re: What's faster -- array formula or UD function?
- Next by Date: Re: Magnificent Problem
- Previous by thread: Re: What does this do?
- Next by thread: Re: What does this do?
- Index(es):
Relevant Pages
|