how to find the last from description in excel code example

Example 1: ms excel find last character in a cell

=RIGHT(A2,LEN(A2)-FIND("@",SUBSTITUTE(A2,"/","@",LEN(A2)-LEN(SUBSTITUTE(A2,"/",""))),1))

Example 2: excel last used row

Dim rLastCell As Range

Set rLastCell = ws.Cells.Find(What:="*", After:=ws.Cells(1, 1), _
    LookIn:=xlFormulas, LookAt:= xlPart, SearchOrder:=xlByColumns, _
    SearchDirection:=xlPrevious, MatchCase:=False)

MsgBox ("The last used column is: " & rLastCell.Column)
MsgBox ("The last used row is: " & rLastCell.Row)

Tags:

Vb Example