I am looking for a vba code which deduct blank cell in col c and then copy & paste formulas mention in above rows till its last row.
File is attached for your reference.
Sub Demo1()
With [Main!A1].CurrentRegion
If Application.CountBlank(.Columns("C:E")) Then .Range("C2:E2").AutoFill .Range("C2:E" & .Rows.Count)
End With
End Sub
Do you like it ? So thanks to click on bottom right Like !
Hi Marc L...it is working fine in the test file which I attached but no in my original file. Error msg says object required and when I debud it highlight first line of code.
I have changed Main! A1 with Pivot Raw! A1 (my original file tab)
and then reference to columns.
not sure what is missing here.
Code:
Sub Formulas()
With [Pivot Raw!A1].CurrentRegion
If Application.CountBlank(.Columns("EA:EP")) Then .Range("EA2:EP2").AutoFill .Range("EA2:EP" & .Rows.Count)
End With
End Sub