Hello:
Please refer to attached file.
I need a VB code to find the row # for 1st occurrence of "GRAND TOTAL:" in column D
As i can see manually it is Row 29
Let me know if you have any questions.
Thanks.
Riz
Hello:
Please refer to attached file.
I need a VB code to find the row # for 1st occurrence of "GRAND TOTAL:" in column D
As i can see manually it is Row 29
Let me know if you have any questions.
Thanks.
Riz
![]()
Sub RowGrandTotal() On Error Resume Next MsgBox Columns("D:D").Find("Grand Total:").Row End Sub
It could also be done with a very simple formula
=MATCH("Grand Total:",D:D)
If you like my answer please click on * Add Reputation
Don't forget to mark threads as "Solved" if your problem has been resolved
"Nothing is so firmly believed as what we least know."
--Michel de Montaigne
Hello JieJenn:
I need a variable as example LastRow=
Please let me know if you have any questions.
Thanks.
Riz
For last row use![]()
Sub Test() MsgBox "Last Row: " & Cells(Rows.Count, 4).End(xlUp).Row End Sub
Hello Jie:
Thanks a lot, this will work for me.
Riz
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks