Cell value changes

Skydave2805

New Member
Joined
Aug 21, 2023
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi all, first time poster and bit of an Excel newbie so be gentle.

I have a nice easy spreadsheet that calculates colleagues commission for them. E8 = C8*D8.
The trouble is, sometimes the value of C8 can sometimes change which has a knock on effect of the value of E8.

Is there a way of keeping the running total in E8 unaffected by the change of the value in C8?

Thanks in advance
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Not with a formula, but you could achieve the result with some VBA each time C8 changes. Could you provide an example of the values for C8 and D8 and how you want E8 to track that?

If you are not opposed to VBA, try this in the worksheet module and change "Sheet1" to the name of your sheet:

VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
With Worksheets("Sheet1")
    If Not Intersect(Target, Range("C8")) Is Nothing Then
        .Range("E8").Value = .Range("E8").Value + .Range("C8").Value * .Range("D8").Value
    End If
End With
End Sub
 
Last edited:
Upvote 0
Thanks for the reply, but I'm not that advanced on Excel and thought a simple formula could sort the issue.
If you can help me through it though I would really appreciate it. I copied the code from the above and placed it in a module but I'm stuck from there.
Also, would it be possible to apply the code to all cells in the C column. I've attached a screen grab of worksheet.
Column C is the commission price which is multiplied by a value in D but the any of the values in C may change from time to time.
 

Attachments

  • MC3000.png
    MC3000.png
    40.8 KB · Views: 5
Upvote 0

Forum statistics

Threads
1,215,167
Messages
6,123,401
Members
449,098
Latest member
ArturS75

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top