is it possbile to use vfind if statement to do nothing. Im trying to get rid of on error resume. Sometime does the formula twice so i have the two last rows with the same number.
Im trying to put the two bottom codes together. I want to try and keep everything with vfind.
Sub Find1()
Dim LtCol As Range
Dim LtRow As Range
On Error Resume Next
With ActiveSheet
myCol = WorksheetFunction.Match("Name", Rows("1:1"), 0)
LR = .Cells(1, 2).End(xlDown).Offset(1, 0).Row
.Cells(LR, myCol).FormulaR1C1 = "=counta(R[-" & LR - 2 & "]C:R[-1]C)"
End with
end sub
Set vFIND = Cells.Find("Name", LookIn:=xlValues, LookAt:=xlPart)
If Not vFIND Is Nothing Then
vFIND.EntireColumn.NumberFormat = "General"
Set vFIND = Nothing
End If
Bookmarks