Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15
Default IF statement inside a SUMIF statement.... or alternative method

I'm just not sure whether this is possible or not.

Can I create a function that goes as below:

=SUMIF(IF(......),Z,A:A)

It seems when I insert an IF statement inside a SUMIF statement, Excel
returns #VALUE! If this is not allowed, how do I get around this problem?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,276
Default IF statement inside a SUMIF statement.... or alternative method

Hi,
the sumif already has the criteria, what do you want to achieve, please post
an example

"Sungibungi" wrote:

I'm just not sure whether this is possible or not.

Can I create a function that goes as below:

=SUMIF(IF(......),Z,A:A)

It seems when I insert an IF statement inside a SUMIF statement, Excel
returns #VALUE! If this is not allowed, how do I get around this problem?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default IF statement inside a SUMIF statement.... or alternative method

=SUMIF(IF(......),Z,A:A)

SUMIF can't be used like that.

Try explaining in words what you want to do.

--
Biff
Microsoft Excel MVP


"Sungibungi" wrote in message
...
I'm just not sure whether this is possible or not.

Can I create a function that goes as below:

=SUMIF(IF(......),Z,A:A)

It seems when I insert an IF statement inside a SUMIF statement, Excel
returns #VALUE! If this is not allowed, how do I get around this problem?



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 269
Default IF statement inside a SUMIF statement.... or alternative method

you may have you criteria in the wrong order

SUMIF(range, criteria, [sum_range]) is the correct format.

Your IF statement would need to evaluate to a range (both when true or
false) to work as you have written your formula. It is possible to have a if
statement return a range (using the offset function would work), but there is
likely an easier way.

You did not provide much detail so I cannot give you a definate answer, but
can offer the following advice.

If you wish to sum something based on multiple criteria (for example sum up
all values in c1:c10 where column A=1 and B="Yes") you could do this in two
ways.

If you have Excel 2007 use the SUMIFS function which allows for multiple
criteria or
use a sumproduct function with conditions.

the formula =Sumproduct(--(A1:a10=1),(b1:b10="Yes"),C1:C10) would work.
--
If this helps, please remember to click yes.


"Sungibungi" wrote:

I'm just not sure whether this is possible or not.

Can I create a function that goes as below:

=SUMIF(IF(......),Z,A:A)

It seems when I insert an IF statement inside a SUMIF statement, Excel
returns #VALUE! If this is not allowed, how do I get around this problem?

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
Alternative IF Statement finster26 Excel Worksheet Functions 4 September 19th 07 12:27 AM
alternative to if statement dan Excel Worksheet Functions 4 August 15th 06 08:20 PM
Multiple Conditional @IF Statement Method crwiseman Excel Worksheet Functions 5 July 7th 06 02:45 PM
vlookup inside an if statement? carlosgdlf Excel Discussion (Misc queries) 3 August 4th 05 02:36 AM
Date Format Inside of a SUMIF Statement Minitman Excel Worksheet Functions 9 June 13th 05 07:52 PM


All times are GMT +1. The time now is 05:05 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"