Range of cells depending on a condition.

Solved/Closed
Milvy - Sep 29, 2015 at 06:05 AM
 Milvy - Sep 29, 2015 at 09:03 AM
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 response

Mazzaropi Posts 1985 Registration date Monday August 16, 2010 Status Contributor Last seen May 24, 2023 147
Sep 29, 2015 at 08:09 AM
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!
0