Range of cells depending on a condition. [Solved/Closed]

Report
-
 Milvy -
Hello,

I am trying to change part of a cell reference for a range of cells depending on a condition.
For example, the formulas in column A & E: A1 =sheet2!B1*B1+2, and A2=sheet2!B2*B2+2 E1=sheet2!B1*B1-2 etc.

If C1=yes then i want to change all cell references in column A & E to any column B to change to D: A1=sheet2!D1*D1+2, A2=sheet2!D2*D2+2 E1=sheet2!D1*D1-2 etc.

Can someone help me with this?

1 reply

Posts
1877
Registration date
Monday August 16, 2010
Status
Contributor
Last seen
February 12, 2021
139
Milvy, Good morning.

Try to use:

A1 =IF(C1="YES";Sheet2!D1*D1+2;Sheet2!B1*B1+2)

A2 =IF(C1="YES";Sheet2!D2*D2+2;Sheet2!B2*B2+2)

E1 =IF(C1="YES";Sheet2!D1*D1-2;Sheet2!B1*B1-2)

Is that what you're looking for?
I hope it helps.
--
Belo Horizonte, Brasil.
Marcílio Lobão
Awesome! thank you very much!

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!