Hi,

Ideally I would like a function that looked something like;

Function copycell(source, dest)

dest = source

End Function

so I could enter in my spreadsheet;

=copycell(A1,B2)

to allow me to copy the contents of A1 to B2

Why?, because I have a spreadsheet that creates different totals, depending on what period (date range) is selected.

If A1 = (Period) 1 is selected the total in Cell A2 = X, if A1 = (period) 2 is selected A2=Y

So the logic is;

When A1 = 1 then copy A2 to A3

When A1 = 2 then copy A2 to B3

When A1 = 3 then copy A2 to C3

But I need the cells in row 3 to RETAIN their data unless the number in A1 is changed back to their relevant value because the values in row 3 are read and used as the starting values for the next period.

A simple IF formula, means only 1 cell in row 3 will hold its value ONLY when its condition is true.

I know now that UDF's other return a value to the same cell.

So maybe I need something that says, if A1 value changes paste A2 value?

Any ideas or tips would be muchly appreciated.

Regards

Michael