CrispyAsian
Board Regular
- Joined
- Sep 22, 2017
- Messages
- 64
Hey everyone,
I'm having an issue and I have no idea why it's happening. I currently have a pretty large macro running, but at one part it's supposed to find the last row, autosum the contents, add the word "Total" to the first column and delete anything in the second column. Here's the section of code that it's running:
The issue is, when I run the macro, for some reason this happens:
Why do columns C-F not have the AutoSum formula in them? Any ideas?
I'm having an issue and I have no idea why it's happening. I currently have a pretty large macro running, but at one part it's supposed to find the last row, autosum the contents, add the word "Total" to the first column and delete anything in the second column. Here's the section of code that it's running:
Code:
With Sheets("Co-Pilot").Range("a1").CurrentRegion
If .Cells(.Rows.Count, 1).Value <> "Total" Then
With .Offset(.Rows.Count).Resize(1)
.Formula = "=sum(r2c:r[-1]c)"
.Columns(1).Value = "Total"
.Columns(2).Value = ""
End With
End If
End With
The issue is, when I run the macro, for some reason this happens:
Why do columns C-F not have the AutoSum formula in them? Any ideas?