Home |
Search |
Today's Posts |
#12
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
thank you.can you let me know how the "Range("A" &
Rows.Count).End(xlup).Select" works?!!what's the function of End(xlup)??!!! "JLatham" wrote: Well, you asked for the last blank cell in column A. Jim Thomlinson gave you a quick way to get to the first blank cell after the last non-blank cell in column A, I'll repeat that he Sub NextBlankAfterLastNonBlank() Range("A" & Rows.Count).End(xlup).Offset(1,0).Select End sub and a minor variation of that gets you to the last cell with something in it, which was also provided earlier? Sub LastCellWithSomethingInIt() Range("A" & Rows.Count).End(xlup).Select End sub "peyman" wrote: hi, this macro takes the active cell to A65536!!! "Gary''s Student" wrote: Just start from the bottom and work upwards: Sub sellstblcell() Dim i As Long For i = Rows.Count To 1 Step -1 If IsEmpty(Cells(i, "A")) Then Cells(i, "A").Select Exit Sub End If Next End Sub -- Gary''s Student - gsnu200745 "peyman" wrote: hi guys, how can I write a Macro to set the Activecell in the activesheet on the last blank cell in column A? thanks in advance. peiman |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I find the next blank cell in a range? | Excel Worksheet Functions | |||
Find First Non blank cell than find column header and return that value | Excel Worksheet Functions | |||
Find 1st blank cell in column & sum to the same row in another col | Excel Worksheet Functions | |||
IF function which can find a blank cell | Excel Worksheet Functions | |||
find the first and last non blank cell in a row | Excel Discussion (Misc queries) |