copy formula without changing all the cell references

cornepiek

New Member
Joined
Jun 22, 2010
Messages
48
hi all

can someone please help me.
how do one structure a formula to so that when being copied only certain parts are updated.

heres an example:
i have a cell that i need to display a certain value, depends on the cell value of another cell.
the cell value i need to display will be the contents of a specific set of cells.

here is the formula: (formula in C2)
=IF(AA2=0,"",IF(AA2=1,I2,IF(AA2=2,I3)))

rather simple.
cell AA2 needs to update as the formula is copied. this column is auto populated with a data import. the values will always be 0, 1 or 2

cells I2 and I3 contains the data reference i need. these MUST stay the same in the formula.

so when i then copy the formula, i need it to automatically update in the following manner:

C2: =IF(AA2=0,"",IF(AA2=1,I2,IF(AA2=2,I3)))
C3: =IF(AA3=0,"",IF(AA3=1,I2,IF(AA3=2,I3)))
C4: =IF(AA4=0,"",IF(AA4=1,I2,IF(AA4=2,I3)))

can someone please assist. i know there is a simple way of accomplishing this


thanks
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

Forum statistics

Threads
1,224,602
Messages
6,179,845
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top