View Single Post
  #14   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default What does this do?

16,784

--
Regards,
Tom Ogilvy

"Jim Thomlinson" wrote in message
...
Out of shear curiosity how many rows does 95 have? It is around 16k isn't

it?
--
HTH...

Jim Thomlinson


"Tom Ogilvy" wrote:

While the need is dissipating, in xl5/95, you choice would error. That

is
why most use Rows.count which would work in all situations.

--
Regards,
Tom Ogilvy

"Jim Thomlinson" wrote in message
...
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!







 
ExcelBanter Database Error
Database Error Database error
The ExcelBanter database has encountered a problem.

Please try the following:
  • Load the page again by clicking the Refresh button in your web browser.
  • Open the www.excelbanter.com home page, then try to open another page.
  • Click the Back button to try another link.
The www.excelbanter.com forum technical staff have been notified of the error, though you may contact them if the problem persists.
 
We apologise for any inconvenience.