Hi,
I am hoping someone can help me with a quick fix. This macro takes data from one sheet and pastes it into another sheet. Columns B, C and D are all populated from another sheet. I need to enter data in columns E and F with the ability to run the macro and not lose the data inputted in E and F.
To put it simply, I need this macro to run repeatedly without affecting columns E and F.
Thank you in advance.
Sub ZeroBasedRationale()
Dim StartingCell As Range
Dim StartingAccount As Range
Dim StartingDesc As Range
Dim StartingAmount As Range
Dim n As Long
Dim m As Long
Sheets("Tab 7 Zero Based Rationale").Range("B10:D350").Delete
Set StartingCell = Sheets("Tab 1 Summary").Range("N15")
Set StartingAccount = Sheets("Tab 7 Zero Based Rationale").Range("B10")
Set StartingDesc = Sheets("Tab 7 Zero Based Rationale").Range("C10")
Set StartingAmount = Sheets("Tab 7 Zero Based Rationale").Range("D10")
For i = 1 To 481
If StartingCell.Offset(m, 0).Value <> 0 And StartingCell.Offset(m, -13).Value <> 0 And StartingCell.Offset(m, -12).Value <> 0 And StartingCell.Offset(m, 0).Value <> 0 Then
StartingAccount.Offset(n, 0) = StartingCell.Offset(m, -13).Value
StartingDesc.Offset(n, 0) = StartingCell.Offset(m, -12).Text
StartingAmount.Offset(n, 0) = StartingCell.Offset(m, 0).Value
n = n + 1
m = m + 1
Else
m = m + 1
End If
Next i
End Sub
Bookmarks