ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   changing cell formulas (https://www.excelbanter.com/excel-discussion-misc-queries/237789-changing-cell-formulas.html)

JulianP

changing cell formulas
 
I wish to change the formula in a group of cells based upon a conditional.
For example if cell A1 is set to X then the formula in cells B2,B3 may be
something. If I change cell A1 to Y then new formula's appear in cells B2,
B3. If this posisble with macros. I have thought of if statements. Is this
the only way

Eduardo

changing cell formulas
 
Hi,
you don't need a macro in cell B2 you can enter

=if($A$1="X",your first formula,if($A$1="Y",your second formula,""))

in the case thar cell a1 is different from X or Y it will leave it blank

if this helps please click yes, thanks

"JulianP" wrote:

I wish to change the formula in a group of cells based upon a conditional.
For example if cell A1 is set to X then the formula in cells B2,B3 may be
something. If I change cell A1 to Y then new formula's appear in cells B2,
B3. If this posisble with macros. I have thought of if statements. Is this
the only way



All times are GMT +1. The time now is 03:58 PM.

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