If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > How do I creat cummulative totals in multiple columns and rows?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-02-08, 18:41
Anazonwu Anazonwu is offline
Registered User
 
Join Date: Jan 2008
Posts: 1
How do I creat cummulative totals in multiple columns and rows?

F G J K L
Regents Avail. Supplied In Stock Used Total
Acetone 0 0 0
Alcohol 70% (Isopropyl) 21 21 21
Alcohol 95% 4 4 4
Alcohol Prep Wipes 3 3 3
Bandages 6 6 6
Basic Trays 48 48 48
BD Microtainer Lancets 30 30 30
Biohazard Bags (Orange) 1 1 1


Here is my is my problem, I was able to create cumulative total using the formula that was given by smitty on 10/02/04. It worked for only one cell and only one row. In my case, I have 2 cells in a row that need a cumulative total and I also have 150 rows that need different cumulative total in columns J (Quant. In Stock), and L (Total available). Theses totals will depend on quant. Supplied (G) and Quant used (K). Both G and K could be any number.
Here is the formula that was used as given by Smitty:


You need a bit of VBA for that:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim rng As Range
' Only look at single cell changes
If Target.Count > 1 Then Exit Sub
Set rng = Range("A2")
' Only look at that range
If Intersect(Target, rng) Is Nothing Then Exit Sub
' Add A2's value to B2
[B2] = [B2] + [A2]
End Sub

Right click the worksheet tab and select View Code. Paste the code into the module window that opens, then ALT+Q to exit back to Excel.


http://www.dbforums.com/t1035690.html

Thanks
Walter
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On