Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
- IF you delete rows/columns it doesn't work ...
UsedRange.Range gets the MAXIMUM RANGE not the REAL range !!! " wrote: Tonhao, Why not simply use: Public Function lastRowNbr(Optional colRef As Variant) As Long If IsMissing(colRef) Then 'Give last row of the longest column lastRow = ActiveSheet.UsedRange.Rows.Count Else 'Give last row of the identified column lastRow = Cells(Rows.Count, colRef).End(xlUp).Row End If End Function Brian M |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Counting rows??? | Excel Discussion (Misc queries) | |||
Counting characters in multiple rows when rows meet specific criteria | Excel Worksheet Functions | |||
Counting Rows | Excel Discussion (Misc queries) | |||
Counting Rows | Excel Discussion (Misc queries) | |||
Counting rows, then counting values. | Excel Discussion (Misc queries) |