Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default SUMIF Sum a column subject to variables in two columns

Hi,

I already use the SUMIF function to calculate the total mileage for a
vehicle stored in columns A1:A50 if another column C1:C50 contains an 'x'.
However I now want to calculate the mileage if C1:C50 contains an 'x' and
column D1:D50 contains 'y'. I've looked at at various queries on this site re
SUMIF with 2 variable but none seem to give an answer on how to nest these
two conditione into the 'CRITERIA' part of the function. Please can anyone
help?
--
Steve D
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default SUMIF Sum a column subject to variables in two columns

=sumproduct(A1:A50*(C1:C50="x")*(D1:D50="y")) or
=sumproduct(A1:A50,--(C1:C50="x"),--(D1:D50="y"))
--
David Biddulph

"Steve sivaD" wrote in message
...
Hi,

I already use the SUMIF function to calculate the total mileage for a
vehicle stored in columns A1:A50 if another column C1:C50 contains an 'x'.
However I now want to calculate the mileage if C1:C50 contains an 'x' and
column D1:D50 contains 'y'. I've looked at at various queries on this site
re
SUMIF with 2 variable but none seem to give an answer on how to nest these
two conditione into the 'CRITERIA' part of the function. Please can anyone
help?
--
Steve D



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,358
Default SUMIF Sum a column subject to variables in two columns

SUMPRODUCT seems to be what you may be looking for:

=SUMPRODUCT(--(C1:C50="x"),--(D1:D50="y"),(A1:A50))
--
** John C **
Please remember if your question is answered, to mark it answered :). It
helps everyone.


"Steve sivaD" wrote:

Hi,

I already use the SUMIF function to calculate the total mileage for a
vehicle stored in columns A1:A50 if another column C1:C50 contains an 'x'.
However I now want to calculate the mileage if C1:C50 contains an 'x' and
column D1:D50 contains 'y'. I've looked at at various queries on this site re
SUMIF with 2 variable but none seem to give an answer on how to nest these
two conditione into the 'CRITERIA' part of the function. Please can anyone
help?
--
Steve D

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,836
Default SUMIF Sum a column subject to variables in two columns

This is a good resource:
http://www.mcgimpsey.com/excel/variablerate.html

This is very good too:
http://www.contextures.com/xlFunctio...tml#SumProduct

Regards,
Ryan---

--
RyGuy


"David Biddulph" wrote:

=sumproduct(A1:A50*(C1:C50="x")*(D1:D50="y")) or
=sumproduct(A1:A50,--(C1:C50="x"),--(D1:D50="y"))
--
David Biddulph

"Steve sivaD" wrote in message
...
Hi,

I already use the SUMIF function to calculate the total mileage for a
vehicle stored in columns A1:A50 if another column C1:C50 contains an 'x'.
However I now want to calculate the mileage if C1:C50 contains an 'x' and
column D1:D50 contains 'y'. I've looked at at various queries on this site
re
SUMIF with 2 variable but none seem to give an answer on how to nest these
two conditione into the 'CRITERIA' part of the function. Please can anyone
help?
--
Steve D




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default SUMIF Sum a column subject to variables in two columns

Hi,

If you are using 2007 your formula would be

=SUMIFS(A1:A50,C1:C50,"x",D1:D50,"y")

No array necessary or sumproduct necessary

If this helps, please click the Yes button

Cheers,
Shane Devenshire

"Steve sivaD" wrote:

Hi,

I already use the SUMIF function to calculate the total mileage for a
vehicle stored in columns A1:A50 if another column C1:C50 contains an 'x'.
However I now want to calculate the mileage if C1:C50 contains an 'x' and
column D1:D50 contains 'y'. I've looked at at various queries on this site re
SUMIF with 2 variable but none seem to give an answer on how to nest these
two conditione into the 'CRITERIA' part of the function. Please can anyone
help?
--
Steve D

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
Two Headers, one subject column and various columns with data ILoveMyCorgi Charts and Charting in Excel 5 October 21st 08 05:48 PM
SUMIF with two or more variables B Benton Excel Worksheet Functions 1 October 13th 07 07:12 PM
SUMIF formula for two variables in two columns luciemaxine Excel Worksheet Functions 2 December 3rd 06 04:13 PM
Variables in the subject line of an e-mail hyperlink midol559 Excel Discussion (Misc queries) 0 September 8th 06 04:30 PM
SUMIF variables Steve Excel Discussion (Misc queries) 2 February 18th 05 01:32 PM


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

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

About Us

"It's about Microsoft Excel"