need help please.....

F

fiur

Hi my question are....
in cell A1 i type a number
that number should show up in cell (lets say c2)
When I type another number in A1 that number should show up in cell c3 and
so on.....

(the number in cell A1 is based on a calculation of several cells and will
change in a function of that calculation...)
The only thing I need answer on is: how to copy the current value of A1 over
to C1
and the new value of A1 into C2 and so on........
 
G

galimi

Code similar to the following on a sheet with the codename Sheet1 should do
what you want:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row = 1 And Target.Column = 1 Then

Set Rng = Sheet1.Range("c2")

Do Until Rng.Value = ""
Set Rng = Rng.Offset(1)
Loop

Rng.Value = Target.Value

End If
End Sub
 
F

fiur

Thanx alot for a quick reply!!!! wow
but I'm a newbie to this.... how do I "Code" on a sheet....
I can only add formulas and stuff never added "codes".....?
 
F

fiur

Okay I manage to figure out how to add that code.... but here is another
question....
the value is based on two other condition :
lets say it will be like this:
A1=1 A2=2 then copy the value in C2 into D1
A1=1 A2=3 then copy the value in C2 into D2
A1=2 A2=1 then coopy the value in C2 into D3
and so on.........
How do I do that ???
 
B

Bernd

Hello,

Select cells D1:D999, for example, and insert as array formula:
=IF(ROW(INDIRECT("1:999"))=$A$1*3+$A$2-4,$C$2,"")

[enter with CTRL + SHIFT + ENTER]

Please notice that all other cells in column D will be reset to "" if
corresponding condition of A1:A2 does not apply.

Regards,
Bernd
 
Top