MODERATOR NOTICE: This topic has also been posted on other sites and may already have an answer elsewhere. Please take this into consideration when answering this question
Hi to all experts,
i have a file with multiple sheets with same format and it subtracts automatically C-D using vba and puts the answer E when i paste new data on it
What i want to do is apply this vba code to F-G=H and I-J=K and P-Q=R on each sheet but couldn't
I use this for consolidating datas which i get every month from branches and i just want to copy and paste whole sheet at once (not column by column) whitout controlling if there are any wrong formulas on it..
I couldnt attach my exact file but have a wetransfer link for it.
There is two code on each sheet, one is,
second code is like that,
- Sub CminusO(LastRw As Long)
- Dim LastE As Long
- Application.ScreenUpdating = False
- Application.Calculation = xlCalculationManual
- Application.EnableEvents = False
- LastE = Cells(Rows.Count, "E").End(xlUp).Row
- Range("e11:e" & LastE) = vbNullStr 'clear any stray E data below table if exists?
- Range("e11:e" & LastRw) = Evaluate("C11:C" & LastRw & "-d11:d" & LastRw)
- Application.ScreenUpdating = True
- Application.Calculation = xlCalculationAutomatic
- Application.EnableEvents = True
- End Sub
Thanks a looottt in advance.