Hi all
Could any of you please let me know if this is possible.
The macro below adds the formula 5 times after the last data entry.
Is there a way to shorten it, so the rows 1-5 could be on 1 line.
Thanks for looking,
Graham
Could any of you please let me know if this is possible.
The macro below adds the formula 5 times after the last data entry.
Is there a way to shorten it, so the rows 1-5 could be on 1 line.
Code:
[COLOR=#222222][FONT=Verdana]Sub Test()
[/FONT][/COLOR]
[COLOR=#222222][FONT=Verdana]Dim lLastRow AsLong[/FONT][/COLOR]
[COLOR=#222222][FONT=Verdana]With Sheets(1)[/FONT][/COLOR]
[COLOR=#222222][FONT=Verdana] lLastRow = .Range("K" & .Rows.Count).End(xlUp).Row
.Range("K" & lLastRow + 1).Formula ="=IF(ISFORMULA(RC[1]),""YES"",""NO"")"
.Range("K" & lLastRow + 2).Formula ="=IF(ISFORMULA(RC[1]),""YES"",""NO"")"
.Range("K" & lLastRow + 3).Formula ="=IF(ISFORMULA(RC[1]),""YES"",""NO"")"
.Range("K" & lLastRow + 4).Formula ="=IF(ISFORMULA(RC[1]),""YES"",""NO"")"
.Range("K" & lLastRow + 5).Formula ="=IF(ISFORMULA(RC[1]),""YES"",""NO"")"[/FONT][/COLOR]
[COLOR=#222222][FONT=Verdana]End With
[/FONT][/COLOR]
[COLOR=#222222][FONT=Verdana]End Sub[/FONT][/COLOR]
Thanks for looking,
Graham