ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   change a formula based on another cell value (https://www.excelbanter.com/excel-discussion-misc-queries/208272-change-formula-based-another-cell-value.html)

SmartBlond

change a formula based on another cell value
 
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.

Sean Timmons

change a formula based on another cell value
 
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.

"SmartBlond" wrote:

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.


SmartBlond

change a formula based on another cell value
 
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!

"Sean Timmons" wrote:

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.

"SmartBlond" wrote:

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.


Sean Timmons

change a formula based on another cell value
 
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...

"SmartBlond" wrote:

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!

"Sean Timmons" wrote:

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.

"SmartBlond" wrote:

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.



All times are GMT +1. The time now is 04:58 AM.

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