# IF cell value are the same then copy value from one cell to other cell

Hi,

I have cells with numbers:

```
C1=4 C2=5 C3=6 C4=7 C5=8
```

and other cell C100

and have columns

```
columns
1 2 3 4 5 6 7 8
54 21 54 54 21 21 32 84
54 21 64 54 26 27 38 94
58 71 34 14 21 21 32 84
54 21 54 54 21 11 32 84
```

and i need formula if cell C1 have same value as other cell C100 then copy data from column 4 to other new column

Hi. If C2 = C100 should column 5 be copied then? If C3=C100, then column 6 and so on? Should data from your columns be copied to the same column overwritng previous values, or there should be different column for every column from original data source?

New column from original data source, i would like to choose from insert cell number which column should be copied to new column

So please correct me if I am wrong. You want to create ONE column (I will name it New Column) which has to be filled with values from your original data, based on your choice. If you enter 8 in your C100 cell, the New Column should be filled with values from Column 8. If then you enter new value in C100, let say 6, then the values in New Column should be overwritten with data from column 6. Is this correct?

Yes, thats right i would like to copy whole column depends what number i put in cell C100

"copy to" is the wrong perspective for a spreadsheet. You have to put a formula into the target cell, which fetches the values from the source column. The function to do this is INDEX in your case. First parameter is the source range, second is the row number and third the column column from that source range. Row and column number are relative to the source range, not to the spreadsheet. To copy a entire column, leave the row empty and insert the formula as matrix formula.