Sub Extremidades()
Range("C4:AB25").Select
c = Selection.Columns.Count
r = Selection.Rows.Count
i = ActiveCell.Address
pc = Mid(i, 2, Application.WorksheetFunction.Search("$", i, 2) - 2)
pl = ActiveCell.Row
f = Cells(ActiveCell.Row + r - 1, ActiveCell.Column + c - 1).Address
uc = Mid(f, 2, Application.WorksheetFunction.Search("$", f, 2) - 2)
ul = ActiveCell.Row + r - 1
MsgBox ("primeira_coluna = " & pc & Chr(13) & "primeira_linha = " & pl & Chr(13) & "última_coluna = " & uc & Chr(13) & "última_linha = " & ul)
End Sub
Existem mil maneiras de preparar Neston. Invente a sua!
http://www.youtube.com/ExpressoExcel
Postado : 02/05/2014 4:43 pm