I'm working with a Macro that generates a column that is the sum of the other two columns in a table. However, the table's row number is not always the same, so when I run the Marco for a table that has less rows, some extra cell in that column will give 0, is there a way I can get rid of them?
The Marco code is here:
Sub sum()
'
' sum Macro
'
' Keyboard Shortcut: Ctrl+s[![enter image description here][1]][1]
'
Range("AV1").Select
ActiveCell.FormulaR1C1 = "AV"
Range("AV2").Select
ActiveCell.FormulaR1C1 = "=RC[-6]+RC[-4]"
Range("AV2").Select
Selection.AutoFill Destination:=Range("AV2:AV84")
Range("AV2:AV84").Select
ActiveWindow.SmallScroll Down:=-30
Range("AV1").Select
End Sub
Please help thank you.