Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 93
Default Sumif with conditions

I am trying do do a sumif using 2 conditions

For example:

I want to add the values in column d if the value in column a is either C or
X.
--
DMM
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Sumif with conditions

One way:

=SUM(SUMIF(A1:A10,{"C","X"},D1:D10))


--
Biff
Microsoft Excel MVP


"soconfused" wrote in message
...
I am trying do do a sumif using 2 conditions

For example:

I want to add the values in column d if the value in column a is either C
or
X.
--
DMM



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 93
Default Sumif with conditions

This didn't work, it gave me 0 for the answer.
--
DMM


"T. Valko" wrote:

One way:

=SUM(SUMIF(A1:A10,{"C","X"},D1:D10))


--
Biff
Microsoft Excel MVP


"soconfused" wrote in message
...
I am trying do do a sumif using 2 conditions

For example:

I want to add the values in column d if the value in column a is either C
or
X.
--
DMM




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Sumif with conditions

Are the numbers in column D actually numbers?

In E1 enter =ISNUMBER(D1) and copy down.

TRUE or FALSE returned?

If FALSE, format all to General. Copy an empty cell and Paste
SpecialAddOKEsc.


Gord Dibben MS Excel MVP

On Tue, 4 Mar 2008 05:20:00 -0800, soconfused
wrote:

This didn't work, it gave me 0 for the answer.


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Sumif with conditions

It should work. See this screencap:

http://img118.imageshack.us/img118/9061/sumsumifkx2.jpg

If you're getting a result of 0 then there's a problem with your data. The
numbers may be numbers formatted as TEXT or there may be unseen charactes
in column A like leading/trailing spaces.

Try this first:

Select an empty cell that hasn't been formatted or used in any way.
Copy that empty cell: EditCopy
Select the range of numbers in column D.
Then, EditPaste SpecialAddOK

Does the formula now work?


--
Biff
Microsoft Excel MVP


"soconfused" wrote in message
...
This didn't work, it gave me 0 for the answer.
--
DMM


"T. Valko" wrote:

One way:

=SUM(SUMIF(A1:A10,{"C","X"},D1:D10))


--
Biff
Microsoft Excel MVP


"soconfused" wrote in message
...
I am trying do do a sumif using 2 conditions

For example:

I want to add the values in column d if the value in column a is either
C
or
X.
--
DMM








  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 93
Default Sumif with conditions

Thank you so much, it was the leading/trailing spaces.
--
DMM


"T. Valko" wrote:

It should work. See this screencap:

http://img118.imageshack.us/img118/9061/sumsumifkx2.jpg

If you're getting a result of 0 then there's a problem with your data. The
numbers may be numbers formatted as TEXT or there may be unseen charactes
in column A like leading/trailing spaces.

Try this first:

Select an empty cell that hasn't been formatted or used in any way.
Copy that empty cell: EditCopy
Select the range of numbers in column D.
Then, EditPaste SpecialAddOK

Does the formula now work?


--
Biff
Microsoft Excel MVP


"soconfused" wrote in message
...
This didn't work, it gave me 0 for the answer.
--
DMM


"T. Valko" wrote:

One way:

=SUM(SUMIF(A1:A10,{"C","X"},D1:D10))


--
Biff
Microsoft Excel MVP


"soconfused" wrote in message
...
I am trying do do a sumif using 2 conditions

For example:

I want to add the values in column d if the value in column a is either
C
or
X.
--
DMM






  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Sumif with conditions

Glad you got it straightened out. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"soconfused" wrote in message
...
Thank you so much, it was the leading/trailing spaces.
--
DMM


"T. Valko" wrote:

It should work. See this screencap:

http://img118.imageshack.us/img118/9061/sumsumifkx2.jpg

If you're getting a result of 0 then there's a problem with your data.
The
numbers may be numbers formatted as TEXT or there may be unseen
charactes
in column A like leading/trailing spaces.

Try this first:

Select an empty cell that hasn't been formatted or used in any way.
Copy that empty cell: EditCopy
Select the range of numbers in column D.
Then, EditPaste SpecialAddOK

Does the formula now work?


--
Biff
Microsoft Excel MVP


"soconfused" wrote in message
...
This didn't work, it gave me 0 for the answer.
--
DMM


"T. Valko" wrote:

One way:

=SUM(SUMIF(A1:A10,{"C","X"},D1:D10))


--
Biff
Microsoft Excel MVP


"soconfused" wrote in message
...
I am trying do do a sumif using 2 conditions

For example:

I want to add the values in column d if the value in column a is
either
C
or
X.
--
DMM








Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sumif with n conditions Teethless mama Excel Worksheet Functions 0 March 28th 07 12:12 AM
Using Sumif with 2 conditions Cheryl W Excel Worksheet Functions 5 March 2nd 06 11:39 AM
sumif with 2 conditions ?? can this be done?? WTG Excel Worksheet Functions 2 July 4th 05 10:08 PM
sumif with 3 conditions Robbert Excel Worksheet Functions 3 May 31st 05 12:14 PM
SUMIF with two conditions Fred Holmes Excel Discussion (Misc queries) 3 May 1st 05 10:10 PM


All times are GMT +1. The time now is 05:47 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"