Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Steved
 
Posts: n/a
Default Finding the last row entered

Hello from Steved

Please in Column A how do i find the last row with data
using a macro.

At the moment I'm on Row 1108 so can a macro find the next
row in this case 1109 biut by tonight I'll be on row 1150,
so in this case would it goto row 1151.

Thankyou Very Much.
  #2   Report Post  
Ron de Bruin
 
Posts: n/a
Default

Hi Steved

You can use this to select the next empty cell

Sub test()
Range("A" & Rows.Count).End(xlUp)(2).Select
End Sub

This will select the last cell with data
Range("A" & Rows.Count).End(xlUp).Select


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Steved" wrote in message ...
Hello from Steved

Please in Column A how do i find the last row with data
using a macro.

At the moment I'm on Row 1108 so can a macro find the next
row in this case 1109 biut by tonight I'll be on row 1150,
so in this case would it goto row 1151.

Thankyou Very Much.



  #3   Report Post  
Alan Perkins
 
Posts: n/a
Default

Assuming the data's in sheet1, this will return the next empty cell in
column A

ThisWorkbook.Sheets("Sheet1").Range("A65536").End( xlUp).Offset(1, 0)

HTH

Alan P.


"Steved" wrote in message
...
Hello from Steved

Please in Column A how do i find the last row with data
using a macro.

At the moment I'm on Row 1108 so can a macro find the next
row in this case 1109 biut by tonight I'll be on row 1150,
so in this case would it goto row 1151.

Thankyou Very Much.



  #4   Report Post  
Trevor Shuttleworth
 
Posts: n/a
Default

Steve

' note that NextRow will be 2 if no data is present
Dim NextRow As Long
NextRow = Range("A" & Rows.Count).End(xlUp).Offset(1, 0).Row
MsgBox NextRow

Regards

Trevor


"Steved" wrote in message
...
Hello from Steved

Please in Column A how do i find the last row with data
using a macro.

At the moment I'm on Row 1108 so can a macro find the next
row in this case 1109 biut by tonight I'll be on row 1150,
so in this case would it goto row 1151.

Thankyou Very Much.



  #5   Report Post  
Jason Morin
 
Posts: n/a
Default

Sub LastCell()
Dim LastCellRow As Long
Dim FirstOpenRow As Long
LastCellRow = Cells(Rows.Count, "A").End(xlUp).Row
FirstOpenRow = LastCellRow + 1
MsgBox FirstOpenRow
End Sub

---
HTH
Jason
Atlanta, GA

-----Original Message-----
Hello from Steved

Please in Column A how do i find the last row with data
using a macro.

At the moment I'm on Row 1108 so can a macro find the

next
row in this case 1109 biut by tonight I'll be on row

1150,
so in this case would it goto row 1151.

Thankyou Very Much.
.



  #6   Report Post  
Steved
 
Posts: n/a
Default

I would like to thankyou all.

Cheers.


-----Original Message-----
Hello from Steved

Please in Column A how do i find the last row with data
using a macro.

At the moment I'm on Row 1108 so can a macro find the

next
row in this case 1109 biut by tonight I'll be on row

1150,
so in this case would it goto row 1151.

Thankyou Very Much.
.

Reply
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
I entered 11/22/2004 in excel workbook and it keeps changing to ## Firefly Excel Worksheet Functions 1 February 24th 05 06:11 PM
Warn if already entered Pat Excel Worksheet Functions 3 February 17th 05 09:14 AM
finding the second largest number in a list bobf Excel Discussion (Misc queries) 1 February 16th 05 01:19 PM
micosoft excel dates entered but changed to sequencial numbers ho. ten twenty Excel Worksheet Functions 1 December 10th 04 02:29 AM
showing the # of times an item is entered in a column Foreplay_Man Excel Worksheet Functions 3 November 10th 04 04:28 PM


All times are GMT +1. The time now is 05:46 AM.

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"