Question_Multiple Running totals_Same worksheet

Joined
Jan 26, 2012
Messages
1
Hello,

I am trying to keep an excel sheet for a formulary at a volunteer clinic for the medications we carry. Part of it will include couple of columns to have the current on hand quantity. I would like one column to have the total on hand quantity, and another column right next to it to have the current amount of medication dispensed. I would like the current amount dispensed column to automatically be subtracted from the total on hand quantity column when a new value is entered. So, it will look like this:

Drug Name, Indication, Dosage, Dispensed Amount, Current On hand
A.....................................................90....................=(1000-90)
B......................................................15.....................=(300-15)
Then, when we dispense again:

Drug Name, Indication, Dosage, Dispensed Amount, Current On hand
A....................................................30.......................=(910-30)
B ................................................................................=(285)

and yet again...

Drug Name, Indication, Dosage, Dispensed Amount, Current On hand
A.................................................... 60...................... =(880-60)
B .....................................................30 ..................... =(285-30)

I have been able to do exactly what I'm looking for for just one row, using a code that I copy and pasted from another forum into the "view code" menu of Visual Basic editor, but I have multiple rows with multiple medications that I'd like to be able to do this for. Is this possible, and can anyone please help me?

Thanks.

T
 
Last edited:

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.

Forum statistics

Threads
1,226,730
Messages
6,192,711
Members
453,748
Latest member
akhtarf3

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