change a formula based on another cell value

S

SmartBlond

I am trying to use a different formula based on the value of cell.
So if the the cell value is "Store" use A1+B1+C1
If the cell value is "HQ" use A1+C1+F1
I know I can make a nice long IF formula (I actually need 3 different ones),
but can I put a formulas in other cells and refer to a different one in based
on the cell values?
Or any other creative idea is welcomed.
 
S

Sean Timmons

Well, if it's only 3, may just be easier to put into one IF.

But, you can put =A1+B1+C1 into, say, A3
Then =A1+C1+F1 into B3

Then your 3rd formula in C3.

So:

=IF(Cell="Store",A3,if(Cell="HQ",B3,C3))

just creates a reference to the formulas.
 
S

SmartBlond

My fault, I made it sound less complex.
I have 8 quarters of info and will be using sumif in the formulas as well.
So I was trying to put the formula in once for each (so 24 total) and not
have all of the possible calcs for each row. May not be possible as the
dynamic nature of moving to a new row would prevent it from using the right
rows of data.
Thank you however. Appreciate the response!
 
S

Sean Timmons

well, depending on the values available, you can use a sumproduct to sum
based on multiple criteria.

=SUMPRODUCT(--(A2:A1000>=quarter1 start date),--(A2:A1000<=quarter1 end
date),sum range)

But, not sure exactly what the goal is, so I'll leave it open ended there...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top