Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
is there any shorter way than using xldown twice?
lRow = Range("a1").End(xlDown).End(xlDown).Row -- Gary |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
not clear wh;y you need two xldowns. are there gaps in between
presume you are interested in the last possible row in the column suppose your column is A in that cas use range("A65536").end(xlup) -- remove $$$ from email addresss to send email "Gary Keramidas" wrote in message ... is there any shorter way than using xldown twice? lRow = Range("a1").End(xlDown).End(xlDown).Row -- Gary |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
there's a gap
-- Gary "R.VENKATARAMAN" wrote in message ... not clear wh;y you need two xldowns. are there gaps in between presume you are interested in the last possible row in the column suppose your column is A in that cas use range("A65536").end(xlup) -- remove $$$ from email addresss to send email "Gary Keramidas" wrote in message ... is there any shorter way than using xldown twice? lRow = Range("a1").End(xlDown).End(xlDown).Row -- Gary |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Gary,
I think that your expression is optimally concise. The alternative: lRow = Columns(1).SpecialCells(xlBlanks)(1)(2).Row is no shorter and requires an error handler, in case all column A cells were populated. --- Regards, Norman "Gary Keramidas" wrote in message ... is there any shorter way than using xldown twice? lRow = Range("a1").End(xlDown).End(xlDown).Row -- Gary |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
ok thanks. just didn't know if there was "scientific notation" like command,
something like xldown(2) to tell it to do it twice. thanks -- Gary "Norman Jones" wrote in message ... Hi Gary, I think that your expression is optimally concise. The alternative: lRow = Columns(1).SpecialCells(xlBlanks)(1)(2).Row is no shorter and requires an error handler, in case all column A cells were populated. --- Regards, Norman "Gary Keramidas" wrote in message ... is there any shorter way than using xldown twice? lRow = Range("a1").End(xlDown).End(xlDown).Row -- Gary |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It didn't actually do it twice.
....(xldown)(2) is equivalent to ...(xldown).offset(1,0) (come down one more row) Gary Keramidas wrote: ok thanks. just didn't know if there was "scientific notation" like command, something like xldown(2) to tell it to do it twice. thanks -- Gary "Norman Jones" wrote in message ... Hi Gary, I think that your expression is optimally concise. The alternative: lRow = Columns(1).SpecialCells(xlBlanks)(1)(2).Row is no shorter and requires an error handler, in case all column A cells were populated. --- Regards, Norman "Gary Keramidas" wrote in message ... is there any shorter way than using xldown twice? lRow = Range("a1").End(xlDown).End(xlDown).Row -- Gary -- Dave Peterson |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
i realize that, i was just wondering if there was a shorter way other than
repeating the command twice thanks -- Gary "Dave Peterson" wrote in message ... It didn't actually do it twice. ...(xldown)(2) is equivalent to ...(xldown).offset(1,0) (come down one more row) Gary Keramidas wrote: ok thanks. just didn't know if there was "scientific notation" like command, something like xldown(2) to tell it to do it twice. thanks -- Gary "Norman Jones" wrote in message ... Hi Gary, I think that your expression is optimally concise. The alternative: lRow = Columns(1).SpecialCells(xlBlanks)(1)(2).Row is no shorter and requires an error handler, in case all column A cells were populated. --- Regards, Norman "Gary Keramidas" wrote in message ... is there any shorter way than using xldown twice? lRow = Range("a1").End(xlDown).End(xlDown).Row -- Gary -- Dave Peterson |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
A lot depends on how the data is laid out and where the blank area is.
if the data is like A1: data A2: data A3: space A4: data blank to the bottom then you could do cells(rows.count,1).End(xlup) or if it is A1: data A2: space A3: data A4: data you could use the Cells(rows.count,1).End(xlup) -- Regards, Tom Ogivly "Gary Keramidas" wrote in message ... i realize that, i was just wondering if there was a shorter way other than repeating the command twice thanks -- Gary "Dave Peterson" wrote in message ... It didn't actually do it twice. ...(xldown)(2) is equivalent to ...(xldown).offset(1,0) (come down one more row) Gary Keramidas wrote: ok thanks. just didn't know if there was "scientific notation" like command, something like xldown(2) to tell it to do it twice. thanks -- Gary "Norman Jones" wrote in message ... Hi Gary, I think that your expression is optimally concise. The alternative: lRow = Columns(1).SpecialCells(xlBlanks)(1)(2).Row is no shorter and requires an error handler, in case all column A cells were populated. --- Regards, Norman "Gary Keramidas" wrote in message ... is there any shorter way than using xldown twice? lRow = Range("a1").End(xlDown).End(xlDown).Row -- Gary -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
IF formula-simple question; simple operator | Excel Discussion (Misc queries) | |||
Simple Question | Excel Discussion (Misc queries) | |||
Simple Simple Excel usage question | Excel Discussion (Misc queries) | |||
simple question, hopefully a simple answer! | Excel Programming | |||
Simple VB question | Excel Programming |