Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Jayden Brown   on Jan 18 In MS Office Category.

  
Question Answered By: Julia Flores   on Jan 18

Sub Macro1()
'
' Macro to find the last Row No of a typed column  cells.
' Macro Created on 1/24/2006 by Mactikus
' Assign shortcut key Ctrl+Shift+S
RowNo = Cells.SpecialCells(xlCellTypeLastCell).Row
ColNo = Cells.SpecialCells(xlCellTypeLastCell).Column
For i = RowNo To 1 Step -1
Cells(1, 5).Formula = "=COUNTIF(" & i & ":" & i & ","""")"
If ColNo > Cells(1, 5).Value Then
GoTo BreakNext
End If
Next i
BreakNext:
Cells(1, 6) = i
End Sub

I am using cells A5 to store the COUNTIF function and A6 to store
the last Rown No.

Share: 

 

This Question has 9 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on return last row? Or get search suggestion and latest updates.


Tagged: