Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I copied the following code from this group to determine the range of
nonblank values on a sheet. It works beautifully. I would like to modify the function to return not only the range, but also the RealLastRow. Any help would be appreciated! Function GetRealLastCell(sh As Worksheet) As Range Dim RealLastRow As Long Dim RealLastColumn As Long On Error Resume Next RealLastRow = _ sh.Cells.Find("*", sh.Range("A1"), , , xlByRows, xlPrevious).Row RealLastColumn = _ sh.Cells.Find("*", sh.Range("A1"), , , xlByColumns, xlPrevious).Column Set GetRealLastCell = sh.Cells(RealLastRow, RealLastColumn) End Function Thanks. Connie |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Modify search function | Excel Worksheet Functions | |||
How a function can modify a value from some cells ? | Excel Programming | |||
Can I modify a Hyperlink with a function? | Excel Discussion (Misc queries) | |||
Modify cell from function | Excel Programming | |||
to modify cells from a function | Excel Programming |