ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   if statement (https://www.excelbanter.com/excel-discussion-misc-queries/98352-if-statement.html)

Karen Smith

if statement
 
I'm trying to create a formula for the following:

If C3 - C2233 = WW and
If AA3 - AA2233 = 1
than add column EW3 - EW 2233

Can someone help?

bj

if statement
 
try
=if(and(C3-C2233=WW,AA3-AA2233=1),Sum(EW3:EW2233),"otherwise")

unless you mean to only add the values in Column EW when the values in
column C and column AA are appropriate
in this case try
=sumproduct(--(C3:C2233=WW),--(AA3:AA2233=1),EW3:EW2233)

"Karen Smith" wrote:

I'm trying to create a formula for the following:

If C3 - C2233 = WW and
If AA3 - AA2233 = 1
than add column EW3 - EW 2233

Can someone help?


Karen Smith

if statement
 
I am only adding the values in Column EW when the values in column C and
column AA are appropriate. Here's the formula I used, but my answer = 0 and
it should have a number in it. What am I doing wrong?

=SUMPRODUCT(--('Master List'!$C$3:$C$2233="ag"),--('Master
List'!$AA$3:$AA$2233="1"),'Master List'!$EW$3:$EW$2233)

"bj" wrote:

try
=if(and(C3-C2233=WW,AA3-AA2233=1),Sum(EW3:EW2233),"otherwise")

unless you mean to only add the values in Column EW when the values in
column C and column AA are appropriate
in this case try
=sumproduct(--(C3:C2233=WW),--(AA3:AA2233=1),EW3:EW2233)

"Karen Smith" wrote:

I'm trying to create a formula for the following:

If C3 - C2233 = WW and
If AA3 - AA2233 = 1
than add column EW3 - EW 2233

Can someone help?


bj

if statement
 
several possibilities
the most probables are
1 the value in column AA is actually a number in which case you should get
rid of the quote marks around 1 and use
=SUMPRODUCT(--('Master List'!$C$3:$C$2233="ag"),--('Master
List'!$AA$3:$AA$2233=1),'Master List'!$EW$3:$EW$2233)
2 there could be leading spaces in column Column C
use the trim() function
....trim(C3:C2233...


"Karen Smith" wrote:

I am only adding the values in Column EW when the values in column C and
column AA are appropriate. Here's the formula I used, but my answer = 0 and
it should have a number in it. What am I doing wrong?

=SUMPRODUCT(--('Master List'!$C$3:$C$2233="ag"),--('Master
List'!$AA$3:$AA$2233="1"),'Master List'!$EW$3:$EW$2233)

"bj" wrote:

try
=if(and(C3-C2233=WW,AA3-AA2233=1),Sum(EW3:EW2233),"otherwise")

unless you mean to only add the values in Column EW when the values in
column C and column AA are appropriate
in this case try
=sumproduct(--(C3:C2233=WW),--(AA3:AA2233=1),EW3:EW2233)

"Karen Smith" wrote:

I'm trying to create a formula for the following:

If C3 - C2233 = WW and
If AA3 - AA2233 = 1
than add column EW3 - EW 2233

Can someone help?



All times are GMT +1. The time now is 03:19 PM.

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