LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #12   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 189
Default macro to find the last blank cell in col. A

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
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
How do I find the next blank cell in a range? EazyCure Excel Worksheet Functions 6 June 11th 07 09:14 PM
Find First Non blank cell than find column header and return that value Silver Rose Excel Worksheet Functions 10 April 30th 07 05:56 PM
Find 1st blank cell in column & sum to the same row in another col Sharon Excel Worksheet Functions 2 March 7th 07 03:00 AM
IF function which can find a blank cell owl37 Excel Worksheet Functions 5 October 19th 06 05:48 PM
find the first and last non blank cell in a row Allan from Melbourne Excel Discussion (Misc queries) 3 May 19th 06 01:12 PM


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