Thread
:
VBA for Last Cell in Formula Range
View Single Post
#
2
Posted to microsoft.public.excel.misc
JE McGimpsey
external usenet poster
Posts: 4,624
VBA for Last Cell in Formula Range
One way:
On Error Resume Next
With Sh.Cells.SpecialCells(xlCellTypeFormulas)
With .Areas(.Areas.Count)
Set rge = .Cells(.Count)
End With
End With
On Error GoTo 0
If Not rge Is Nothing Then MsgBox rge.Address
In article .com,
wrote:
Using VBA
Trying to indentify the last cell on sheet that has a formula.
code fragment below
have tried
Set rge = Sh.UsedRange.SpecialCells(xlCellTypeFormulas,
xlCellTypeLastCell)
msgbox rge.Address
However I this returns the address of all formula cells
Any suggestions to get the address of the last cell with a formula ?
ie used range a1: j 100 , and last formula may be j 89
Reply With Quote
JE McGimpsey
View Public Profile
Find all posts by JE McGimpsey