SOLVED

Dynamic Substract

Super Contributor

Hello Everyone,

 I would like the number in cell C2 to decrease every time I add a number to the whole of the column C. I would like for any number I enter into the B column to be subtracted automatically from the C2 cell every time a new number is written.

Screenshot (6486).png

 

What formula should i write?

 

Please help..??

 

Here is a attached file...

 

9 Replies

@Zan_Hanifee The most basic approach would be to enter in C3:

 =C2-B3

and drag down.

Sir! is it possible to automatic change in C2 when we enter number in B2?

@Zan_Hanifee Not sure what you mean but perhaps like in the picture below??

Riny_van_Eekelen_0-1647074985156.png

 

@Zan_Hanifee 

I think you want to do this row by row. I would not recommend that: you would not have a history of changes, and it would be very difficult to correct mistakes.

But if you really want it, you could use the Worksheet_Change event procedure. See the attached version (now a .xlsm workbook)

best response confirmed by Zan_Hanifee (Super Contributor)
Solution

@Zan_Hanifee 

 

Use this formula =$C$2-SUM($B$3:B3). Also, I have attached screenshot for reference.

Gaurav675_0-1647079805632.png

 

It helps.
Thank you so much sir.
Thank you so much sir
it worked! Thank you so much sir.

@Zan_Hanifee 

With an up to date version of 365, one could have

= IF(paidBack, 
     SCAN(loanAmount, paidBack, 
          LAMBDA(acc,p, acc-p)),
  "")

which grows dynamically

image.png