ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How do I do a "between" in an IF statement? (https://www.excelbanter.com/excel-worksheet-functions/96633-how-do-i-do-between-if-statement.html)

MojoBaer

How do I do a "between" in an IF statement?
 
I need to sum a column and the condition has multiple criteria:


SUMIF($G$16:$G$28, between 5 and 10, $E$16:$E$28)

how do I represent "between 5 and 10"?



Don Guillett

How do I do a "between" in an IF statement?
 
=sumproduct((g16:g28=5)*(g16:g28<10)*e16:e28)

--
Don Guillett
SalesAid Software

"MojoBaer" wrote in message
...
I need to sum a column and the condition has multiple criteria:


SUMIF($G$16:$G$28, between 5 and 10, $E$16:$E$28)

how do I represent "between 5 and 10"?





Beege

How do I do a "between" in an IF statement?
 
"MojoBaer" wrote in message
...
I need to sum a column and the condition has multiple criteria:

SUMIF($G$16:$G$28, between 5 and 10, $E$16:$E$28)
how do I represent "between 5 and 10"?


I thin you need an AND(___<10, ___5) in there

Beege



Bearacade

How do I do a "between" in an IF statement?
 

Or you can do this..

=SUMIF($G$16:$G$28,"=5")-SUMIF($G$16:$G$28,"10")


--
Bearacade


------------------------------------------------------------------------
Bearacade's Profile: http://www.excelforum.com/member.php...o&userid=35016
View this thread: http://www.excelforum.com/showthread...hreadid=556554


[email protected]

How do I do a "between" in an IF statement?
 
Bearacade wrote:
Or you can do this..
=SUMIF($G$16:$G$28,"=5")-SUMIF($G$16:$G$28,"10")


A m-u-c-h more intuitive expression. KISS!

Of course you meant sumif(..., $E$16:$E$28) in both cases; a minor
omission.


MojoBaer

How do I do a "between" in an IF statement?
 
Thanks, Don! It worked great.

sumproduct? never in a million years would I have figured that out....

"Don Guillett" wrote:

=sumproduct((g16:g28=5)*(g16:g28<10)*e16:e28)

--
Don Guillett
SalesAid Software

"MojoBaer" wrote in message
...
I need to sum a column and the condition has multiple criteria:


SUMIF($G$16:$G$28, between 5 and 10, $E$16:$E$28)

how do I represent "between 5 and 10"?






Bearacade

How do I do a "between" in an IF statement?
 

Wrote:
Bearacade wrote:
Or you can do this..
=SUMIF($G$16:$G$28,"=5")-SUMIF($G$16:$G$28,"10")


A m-u-c-h more intuitive expression. KISS!

Of course you meant sumif(..., $E$16:$E$28) in both cases; a minor
omission.


Aye yes, hehe. Thanks for catching that mistake =)


--
Bearacade


------------------------------------------------------------------------
Bearacade's Profile:
http://www.excelforum.com/member.php...o&userid=35016
View this thread: http://www.excelforum.com/showthread...hreadid=556554


Don Guillett

How do I do a "between" in an IF statement?
 
did you test?

--
Don Guillett
SalesAid Software

"Beege" wrote in message
...
"MojoBaer" wrote in message
...
I need to sum a column and the condition has multiple criteria:

SUMIF($G$16:$G$28, between 5 and 10, $E$16:$E$28)
how do I represent "between 5 and 10"?


I thin you need an AND(___<10, ___5) in there

Beege




Don Guillett

How do I do a "between" in an IF statement?
 
A m-u-c-h more intuitive expression. KISS!
why do you think that is better than learning to use sumproduct?

--
Don Guillett
SalesAid Software

wrote in message
oups.com...
Bearacade wrote:
Or you can do this..
=SUMIF($G$16:$G$28,"=5")-SUMIF($G$16:$G$28,"10")


A m-u-c-h more intuitive expression. KISS!

Of course you meant sumif(..., $E$16:$E$28) in both cases; a minor
omission.





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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com