Re: Help with SUMIF
- From: "Bob Phillips" <bob.NGs@xxxxxxxxxxxxx>
- Date: Wed, 15 Aug 2007 11:21:00 +0100
It worked because any non-zero value is TRUE, so for the odd columns *1
comes out as true as well as =1. In fact, for odd row, you don't need *1 or
=1, it works with neither, but it just is more obvious with =1 IMO.
--
---
HTH
Bob
(there's no email, no snail mail, but somewhere should be gmail in my addy)
"Bob" <Bob@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:A001DD08-E0FD-4E89-BEF9-D2A94AA98390@xxxxxxxxxxxxxxxx
Bob,
It's interesting that *1 also worked in the first formula, but maybe it
was
just a coincidence.
Anyway, thanks a million for all your help! I sincerely appreciate it.
Bob
"Bob Phillips" wrote:
Actually, there were typos in that formula it should have been
=SUMPRODUCT(--(MOD(COLUMN(A2:M2),2)=1),--(A1:M1<=--"2009/04/30"),A2:M2)
and then
=SUMPRODUCT(--(MOD(COLUMN(A2:M2),2)=0),--(A1:M1<=--"2009/04/30"),A2:M2)
--
---
HTH
Bob
(there's no email, no snail mail, but somewhere should be gmail in my
addy)
"Bob" <Bob@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:95D27245-F39F-4B12-A635-32C40E073990@xxxxxxxxxxxxxxxx
Bob,
That did the trick! I even was able to replace "2009/04/30" with a
VLOOKUP
formula.
Since your formula adds up all the Mgmt. columns (e.g., A, C, E, etc.),
could you kindly tell me how to modify it to add up all the Non-Mgmt.
columns
(e.g., B, D, F, etc.)?
Thanks again,
Bob
"Bob Phillips" wrote:
Assuming your results are in N2 etc
=SUMPRODUCT(--(MOD(COLUMN(A2:M2),2)*1),--(1:1<=--"2009/04/30"),A2:M2)
--
HTH
Bob
(there's no email, no snail mail, but somewhere should be gmail in my
addy)
"Bob" <Bob@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:33E2B3D5-F998-4EFD-B9D6-DDBEFEB5D01D@xxxxxxxxxxxxxxxx
Bob,
Thanks for the suggestion. However, I have several rows of data,
and
each
row needs to be summed separately. How would I modify your formula
to
do
that?
Thanks again,
Bob
"Bob Phillips" wrote:
Assuing the dates are in row 1, amounts in 2, and testing for up to
and
inclduing 30th April
=SUMPRODUCT(--(MOD(COLUMN(2:2),2)*1),--(1:1<=--"2009/04/30"),2:2)
--
---
HTH
Bob
(there's no email, no snail mail, but somewhere should be gmail in
my
addy)
"Bob" <Bob@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:A9F39B18-91B3-4AA6-A719-588706332E0E@xxxxxxxxxxxxxxxx
For whatever it's worth, below is the current formula I've
written,
but
it
only works when the data is in consecutive columns, not when the
data
is
in
every other column:
=SUMIF(INDIRECT("A2:"&ADDRESS(ROW(),MATCH(MAX($A1:$AJ1)+1,$A1:$AJ1,1))),">0")
"Bob" wrote:
Columns A & B = Jan 2008 - Mgmt. and Jan 2008 Non-Mgmt.,
respectively.
Columns C & D = Feb 2008 - Mgmt. and Feb 2008 Non-Mgmt.,
respectively.
Columns E & F = Mar 2008 - Mgmt. and Mar 2008 Non-Mgmt.,
respectively.
etc.
Based on a pull-down box I created where a user selects an
ending
period
(month-year), I'm trying to use the SUMIF function whereby it
should
add
up
only the "Mgmt." columns, and only up through the selcted ending
period.
So
even though the work*** contains data for all the months
through
the
end of
2010, if a user selects Apr 2009 as the ending period, for
example,
I
need
SUMIF to add only the "Mgmt." columns from Jan 2008 up to (and
including)
Apr
2009.
FYI - I rigged it so that the month-year labels beyond the
selected
month-year are automatically shown as being blank, thinking that
I
could
somehow use SUMIF to look for and stop adding every other column
when
it
encountered the first blank month-year label. But no such luck.
BTW, I need to solve the aforementioned problem using a
work***
function.
I cannot use a macro (for a variety of reasons).
Any help would be greatly appreciated.
Thanks,
Bob
.
- Follow-Ups:
- Re: Help with SUMIF
- From: Bob
- Re: Help with SUMIF
- From: Bob
- Re: Help with SUMIF
- References:
- Re: Help with SUMIF
- From: Bob Phillips
- Re: Help with SUMIF
- From: Bob
- Re: Help with SUMIF
- From: Bob Phillips
- Re: Help with SUMIF
- From: Bob
- Re: Help with SUMIF
- From: Bob Phillips
- Re: Help with SUMIF
- From: Bob
- Re: Help with SUMIF
- Prev by Date: Re: dividing words in selected cells
- Next by Date: Re: Nested functions inc. dynamic range
- Previous by thread: Re: Help with SUMIF
- Next by thread: Re: Help with SUMIF
- Index(es):