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 / Worksheet Functions / April 2007

Tip: Looking for answers? Try searching our database.

sum certain cells in a column based on criteria from another colum

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
rainbowraven - 10 Apr 2007 22:04 GMT
I have a huge spread sheet that I'd like to automate.  My current delima is
how to calculate a dollar amount in one cell with information from column J
based on the criteria, same row, but in column N.  I've tried the sumproduct
information but I'm entering it in wrong ...  I've read the questions here
and I know this should be a relatively simply formula but I can not get my
brain wrapped around it.  Any help would be appreciated.

Thanks

Donna
T. Valko - 10 Apr 2007 22:16 GMT
If you want a sum based on one condition then SUMIF is the function to use:

If column J = "X" sum column N:

=SUMIF(J:J,"X",N:N)

You would only need to use SUMPRODUCT if there is more than a single
condition involved:

If column J = "X" and column K = 100 sum column N:

=SUMPRODUCT(--(J1:J100="X"),--(K1:K100=100),N1:N100)

Note that with SUMPRODUCT you can't use entire columns as range references
(unless you're using Excel 2007).

Biff

>I have a huge spread sheet that I'd like to automate.  My current delima is
> how to calculate a dollar amount in one cell with information from column
[quoted text clipped - 8 lines]
>
> Donna
T. Valko - 11 Apr 2007 00:06 GMT
>If you want a sum based on one condition then SUMIF is the function to use

Under *most* circumstances.

There are some situations where a single condition will require SUMPRODUCT:

1234.....10
201.......20
1...........33
666.......17
55.........20

Sum column B where column A starts with a 1:

=SUMPRODUCT(--(LEFT(A1:A5)="1"),B1:B5)

Biff

> If you want a sum based on one condition then SUMIF is the function to
> use:
[quoted text clipped - 30 lines]
>>
>> Donna
rainbowraven - 11 Apr 2007 00:22 GMT
I thought of the sumif function but here is what I can not get my brain
wrapped around

Column J = dollar amounts, of all shapes and sizes
Column N = a identifier of what kind of account that money is in, A, B, C,
or D for the different types of accounts.

What I'm wanting to do is in another cell elsewhere in the spreadsheet, pull
all the A's from column N and add the dollar amounts together for a sum in
that cell,
Below it another cell for the B's sum and C's combined,
and then another for D's

I could do a sort manually, that's what they have been doing before, but I'd
like to try to figure out a formula that will search out those identifiers
and sum up their corresponding $ amounts.  

clear as mud?

> I have a huge spread sheet that I'd like to automate.  My current delima is
> how to calculate a dollar amount in one cell with information from column J
[quoted text clipped - 6 lines]
>
> Donna
T. Valko - 11 Apr 2007 02:46 GMT
SUMIF will do what you want:

A1 = A
A2 = B
A3 = C
A4 = D

Entered in B1 and copied down to B4:

=SUMIF(N:N,A1,J:J)

Biff

>I thought of the sumif function but here is what I can not get my brain
> wrapped around
[quoted text clipped - 32 lines]
>>
>> Donna
rainbowraven - 11 Apr 2007 19:00 GMT
nope, that isn't working. :(  ... the A, B, C or D's in Column N vary
depending on what kind of account retention.  What I'm trying to do is
calculate a running total of all the C $amounts from column J in J3, the B
amounts in J2 and the D amounts in cell J6.  Does that help?

Column J                              Column N

$7458965.15                               D
$42215.09                                   A
$1897.98                                     D
$29426.12                                  Blank
$87452.96                                   B
$19872.32                                   C
etc.

> SUMIF will do what you want:
>
[quoted text clipped - 45 lines]
> >>
> >> Donna
T. Valko - 11 Apr 2007 19:33 GMT
Hmmm....

Based on your sample, if you enter this formula:

=SUMIF(N:N,"C",J:J)

The result is 19872.32

If that's not the result you want then I don't understand what you want.

Biff

> nope, that isn't working. :(  ... the A, B, C or D's in Column N vary
> depending on what kind of account retention.  What I'm trying to do is
[quoted text clipped - 67 lines]
>> >>
>> >> Donna
rainbowraven - 12 Apr 2007 22:42 GMT
OMG! thank you Biff!!  

> Hmmm....
>
[quoted text clipped - 79 lines]
> >> >>
> >> >> Donna
T. Valko - 13 Apr 2007 02:05 GMT
I hope that means you got this to work! Thanks for the feedback!

Biff

> OMG! thank you Biff!!
>
[quoted text clipped - 87 lines]
>> >> >>
>> >> >> Donna
 
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.