LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 142
Default lastrow function

Given this function:

Function LastRowByRow(sh As Worksheet)
On Error Resume Next
LastRowByRow = sh.Cells.Find(What:="*", _
After:=sh.Range("A1"), _
Lookat:=xlPart, _
LookIn:=xlFormulas, _
SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious, _
MatchCase:=False).Row
On Error GoTo 0
End Function

How would I go about changing this to a specific column instead of the
entire worksheet?

Example of how it's called now:
Sheet7.Range("D" & LastRowByRow(Sheet7) + 1).Value = NewEntry

 
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
Lastrow - function not defined seed Excel Discussion (Misc queries) 2 August 7th 08 06:34 PM
Assistance with LASTROW function in VB Barb Reinhardt Excel Programming 8 November 28th 05 05:55 PM
LastRow function - #VALUE slc[_17_] Excel Programming 4 September 1st 05 09:47 PM
'LastRow' Function not working Randy Reese[_2_] Excel Programming 4 July 17th 04 03:44 AM
Go to lastrow using other column's lastrow stakar[_14_] Excel Programming 5 April 16th 04 03:42 PM


All times are GMT +1. The time now is 06:50 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"