Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / May 2008

Tip: Looking for answers? Try searching our database.

Summing values... conditionally

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Brad - 29 May 2008 16:40 GMT
I have two columns: Column A for a series of account numbers for each asset
comprising it; the second, Column B holding dollar values.

In each column, each account is separated from the next by a row where
Column A has "Sub Account Number" and Column B has "Market Value".

How do I sum the values in Column B for each unique Sub Account Number and
place the result in Column C adjacent to each account's last Column B entry?
I have typed in "total" where I need the summed values to appear.

Here is how it looks:

     Sub Account Number  Market Value
     10534161  $                    -
     10534161  $                    -
     10534161  $             288.44
     10534161  $         14,463.87
     10534161  $          2,007.25
     10534161  $         13,001.17  total
     Sub Account Number  Market Value
     10610506  $       119,892.62
     10610506  $                    -
     10610506  $                    -
     10610506  $          8,523.41
     10610506  $       137,554.40
     10610506  $       179,931.31
     10610506  $         22,761.19
     10610506  $         22,940.00
     10610506  $       222,170.79
     10610506  $    1,255,596.00  total
     Sub Account Number  Market Value
     10827866  $             212.27
     10827866  $                    -
     10827866  $                    -
     10827866  $          6,373.75
     10827866  $         22,929.03
     10827866  $         28,844.96  total
     Sub Account Number  Market Value
     10829866  $             417.08
     10829866  $                    -
     10829866  $                    -
     10829866  $         22,929.03
     10829866  $         28,844.96  total
     Sub Account Number  Market Value
     10854398  $          1,185.40
     10854398  $                    -
     10854398  $                    -
     10854398  $          9,934.68
     10854398  $          4,826.20
     10854398  $          4,464.85
     10854398  $          4,301.25
     10854398  $          5,595.59
     10854398  $         14,868.90  total

My thanks in advance for any suggestions.

Brad
Sam Wilson - 29 May 2008 16:55 GMT
Type this in C1 and then drag it down:

=IF(A2="Sub Account Number",SUMIF(B:B,A1,A:A),"")

> I have two columns: Column A for a series of account numbers for each asset
> comprising it; the second, Column B holding dollar values.
[quoted text clipped - 53 lines]
>
> Brad
Sam Wilson - 29 May 2008 16:56 GMT
Back to front... use this.

=IF(A2="Sub Account Number",SUMIF(A:A,A1,B:BA),"")

> Type this in C1 and then drag it down:
>
[quoted text clipped - 57 lines]
> >
> > Brad
Brad - 29 May 2008 17:18 GMT
Great! Thanks Sam...

Brad

> Back to front... use this.
>
[quoted text clipped - 64 lines]
>> >
>> > Brad
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.