Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Cell entry

18 views
Skip to first unread message

Sudipta Sen

unread,
Nov 25, 2009, 4:16:01 AM11/25/09
to
Want to input data A1, B1 & C1 on sheet 1, which will be save / store on
sheet 2 at A1,B1, and C1, again I want to input new data on sheet 1 at A1,B1
and C1 which will be automatically save / store on Sheet 2 at A2, B2, and C2,
repeatedly I want to input another new data on sheet 1 at A1, B1, & C1, whcih
will be again save on sheet 2 at A3, B3, & C3 and so on.
Means input cell (A1) on sheet 1 will be same but output data on sheet 2
will be A1,A2,A3 and so on.

Rdgss........Sudipta

Jarek Kujawa

unread,
Nov 25, 2009, 4:56:09 AM11/25/09
to
Press ALT+F11 to get to VBA
in Project - VBAProject window double click on Sheet1
select Worksheet_Change event (or paste the following code)

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then Worksheets("Sheet2").Range("A" &
WorksheetFunction.CountA(Worksheets("Sheet2").Range("A:A")) + 1) =
Target.Value
ElseIf Target.Address = "$B$1" Then Worksheets("Sheet2").Range("A" &
WorksheetFunction.CountA(Worksheets("Sheet2").Range("A:A")) + 1) =
Target.Value
ElseIf Target.Address = "$C$1" Then Worksheets("Sheet2").Range("A" &
WorksheetFunction.CountA(Worksheets("Sheet2").Range("A:A")) + 1) =
Target.Value
End If
End Sub


On 25 Lis, 10:16, Sudipta Sen <Sudipta...@discussions.microsoft.com>
wrote:

Jacob Skaria

unread,
Nov 25, 2009, 8:53:02 AM11/25/09
to
Hi Sudipta

Try the below

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Row = 1 And Target.Column <= 3 Then
If Target.Text <> "" Then _
Sheets("Sheet2").Cells(Rows.Count, _
Target.Column).End(xlUp).Offset(1) = Target.Text
End If
End Sub

If this post helps click Yes
---------------
Jacob Skaria

0 new messages