SUMIF w/ changing column refernce ... use an array?
Assuming the month is in M1, then
=SUMPRODUCT((ISNUMBER(MATCH(A2:A20,{1593011,161301 1},0)))*(D2:G20)*(ISNUMBER(MATCH(D1:G1,M1,0))))
--
HTH
Bob
(there's no email, no snail mail, but somewhere should be gmail in my addy)
"Ray" wrote in message
oups.com...
Hi Bob -
Stores are identified by a 3-digit number ... in this case, 159 & 161
are the ones that would need to be combined (along with the account
number) -- for instance, for acct#3011, it would be 1593011 + 1613011.
The 'changing column reference' is needed b/c the user selects the
month of data they want to see. The data dump (from another system)
comes out structured like this:
Col A: Store #
Col B: Acct #
Col C: [blank, per my instruction to SysAdmin]
Col D: September data
Col E: October data
etc.....
Col D is September to coincide with Fiscal Year timing. So, if the
user selects "September" from the drop-down, the column reference
(cell C3 from example above) would equal 4.
So, to summarize, if the user wants to see (for ex) December, the
formula would look like this (in layman terms):
Sum the values in the 4th column (from left) where the value in Col D
equals either 1593011 OR 1613011
Does that clarify the situation? or, is there a better way to do
this?
|