Ok, I'm using the formula =SUMIF(B1,"=X",A1) to show the value of cell A1
only if cell B1 has an "X". I want to include the value of 2 other cells
along with cell A1 but only if cell B1 has the "X".
--
Lee Davenport
Ok, I'm using the formula =SUMIF(B1,"=X",A1) to show the value of cell A1
only if cell B1 has an "X". I want to include the value of 2 other cells
along with cell A1 but only if cell B1 has the "X".
--
Lee Davenport
"Lee" wrote:
> Ok, I'm using the formula =SUMIF(B1,"=X",A1) to show
> the value of cell A1 only if cell B1 has an "X".
First, why would you use SUMIF() for this purpose? That's
like "killing an ant with a sledgehammer". Why not simply
one of the following?
=if(B1 = "X", A1, 0)
=(B1 = "X")*A1
> I want to include the value of 2 other cells along with cell
> A1 but only if cell B1 has the "X".
Will one of the following fit the bill?
=if(B1 = "X", sum(A1:A3), 0)
=if(B1 = "X", A1+A3+A5, 0)
=(B1 = "X")*sum(A1:A3)
=(B1 = "X")*(A1+A3+A5)
Thanks. That worked perfectly.
--
Lee Davenport
"joeu2004@hotmail.com" wrote:
> "Lee" wrote:
> > Ok, I'm using the formula =SUMIF(B1,"=X",A1) to show
> > the value of cell A1 only if cell B1 has an "X".
>
> First, why would you use SUMIF() for this purpose? That's
> like "killing an ant with a sledgehammer". Why not simply
> one of the following?
>
> =if(B1 = "X", A1, 0)
> =(B1 = "X")*A1
>
> > I want to include the value of 2 other cells along with cell
> > A1 but only if cell B1 has the "X".
>
> Will one of the following fit the bill?
>
> =if(B1 = "X", sum(A1:A3), 0)
> =if(B1 = "X", A1+A3+A5, 0)
> =(B1 = "X")*sum(A1:A3)
> =(B1 = "X")*(A1+A3+A5)
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks