I have applied a macro to insert serial no IF ISBLANK Cell and Here I know we can apply this with formula also why I have applied a macro to insert serial no IF ISBLANK Cell because I want to insert serial no automatic with applying the macro that's why I have created a macro for this and here is a problem I have getting (Compile Error: Argument Not Optional) in this macro
here I want when the macro applied serial no and then the formula should be hidden in that cell range
Sub SerialNo()
Dim LastRow As Long
LastRow = Cells(Rows.count, "B").End(xlUp).Row
With Range("A1:A" & LastRow).FormulaR1C1 = "=IF(ISBLANK(RC[1]),"""",COUNTA(R1C2:RC[1]))"
Range.Value
End Sub