SOLVED

Help with formula

Copper Contributor

HI 

I am using the IF formula =If(C2,C1,D1) but when I drag the formula down to other rows, it is increasing the numbers, ie =if(C3,C2,D2) can anyone advise

4 Replies

@BellaAliG Well, that's the default behavior for drag and drop. If you want the row numbers to stay as they are, place $ signs in front of the row references. 

So that would be: =If(C$2,C$1,D$1) 

 

best response confirmed by BellaAliG (Copper Contributor)
Solution

@BellaAliG 

 

Switch between relative, absolute, and mixed references

As an example, if you copy the formula =B4*C4 from cell D4 to D5, the formula in D5 adjusts to the right by one column and becomes =B5*C5. If you want to maintain the original cell reference in this example when you copy it, you make the cell reference absolute by preceding the columns (B and C) and row (2) with a dollar sign ($). Then, when you copy the formula =$B$4*$C$4 from D4 to D5, the formula stays exactly the same.

 

In your case it would be: =If(C$2,C$1,D$1) or =If($C$2,$C$1,$D$1)  , depending on your reference.

 

I would be happy to know if I could help.

 

Nikolino

I know I don't know anything (Socrates)

* Kindly Mark and Vote this reply if it helps please, as it will be beneficial to more Community members reading here.

 

 

@Riny_van_Eekelen Thank you

Thank you this was very informative and helpful.
1 best response

Accepted Solutions
best response confirmed by BellaAliG (Copper Contributor)
Solution

@BellaAliG 

 

Switch between relative, absolute, and mixed references

As an example, if you copy the formula =B4*C4 from cell D4 to D5, the formula in D5 adjusts to the right by one column and becomes =B5*C5. If you want to maintain the original cell reference in this example when you copy it, you make the cell reference absolute by preceding the columns (B and C) and row (2) with a dollar sign ($). Then, when you copy the formula =$B$4*$C$4 from D4 to D5, the formula stays exactly the same.

 

In your case it would be: =If(C$2,C$1,D$1) or =If($C$2,$C$1,$D$1)  , depending on your reference.

 

I would be happy to know if I could help.

 

Nikolino

I know I don't know anything (Socrates)

* Kindly Mark and Vote this reply if it helps please, as it will be beneficial to more Community members reading here.

 

 

View solution in original post