#1   Report Post  
John Hunt
 
Posts: n/a
Default Archive

If I have two cells say A1 and B1 and I always use these cells to input my
data. How can I archive this information to another cell. For example: If
A1 = 5 and B1 = 6 and I want this information inserted in C1 and D1. The
next time A1 = 10 and B1 = 11. I want these values inserted into cells C2
and D2 and so on. So what ever I insert into cells A1 and B1 it contantly
archives the information into cells C1 and D1 and down. Please help!!!


  #2   Report Post  
Frank Kabel
 
Posts: n/a
Default

Hi
this is not possible using formulas alone. This would require VBA

--
Regards
Frank Kabel
Frankfurt, Germany

"John Hunt" schrieb im Newsbeitrag
...
If I have two cells say A1 and B1 and I always use these cells to

input my
data. How can I archive this information to another cell. For

example: If
A1 = 5 and B1 = 6 and I want this information inserted in C1 and D1.

The
next time A1 = 10 and B1 = 11. I want these values inserted into

cells C2
and D2 and so on. So what ever I insert into cells A1 and B1 it

contantly
archives the information into cells C1 and D1 and down. Please

help!!!



  #3   Report Post  
John Hunt
 
Posts: n/a
Default

That is what I was afraid of. Thanks for the reassurance though.

"Frank Kabel" wrote in message
...
Hi
this is not possible using formulas alone. This would require VBA

--
Regards
Frank Kabel
Frankfurt, Germany

"John Hunt" schrieb im Newsbeitrag
...
If I have two cells say A1 and B1 and I always use these cells to

input my
data. How can I archive this information to another cell. For

example: If
A1 = 5 and B1 = 6 and I want this information inserted in C1 and D1.

The
next time A1 = 10 and B1 = 11. I want these values inserted into

cells C2
and D2 and so on. So what ever I insert into cells A1 and B1 it

contantly
archives the information into cells C1 and D1 and down. Please

help!!!





  #4   Report Post  
Gord Dibben
 
Posts: n/a
Default

John

If you want the VBA, try this.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
On Error GoTo stoppit
Application.EnableEvents = False
If Target.Address = "$A$1" And Target.Value < "" _
And IsNumeric(Target.Value) Then
ActiveSheet.Cells(Rows.Count, 3).End(xlUp) _
.Offset(1, 0).Value = Target.Value
End If
If Target.Address = "$B$1" And Target.Value < "" _
And IsNumeric(Target.Value) Then
ActiveSheet.Cells(Rows.Count, 4).End(xlUp) _
.Offset(1, 0).Value = Target.Value
End If
stoppit:
Application.EnableEvents = True
End Sub


NOTE: it will place first two numbers from A1 and B1 into C2 and D2

Just delete C1 and D1(shift cells up) and then you're good to go from then on.

Right-click on your sheet tab and select "View Code". Copy the above code
into the module that opens.

Gord Dibben Excel MVP

On Tue, 2 Nov 2004 13:44:06 -0500, "John Hunt" wrote:

That is what I was afraid of. Thanks for the reassurance though.

"Frank Kabel" wrote in message
...
Hi
this is not possible using formulas alone. This would require VBA

--
Regards
Frank Kabel
Frankfurt, Germany

"John Hunt" schrieb im Newsbeitrag
...
If I have two cells say A1 and B1 and I always use these cells to

input my
data. How can I archive this information to another cell. For

example: If
A1 = 5 and B1 = 6 and I want this information inserted in C1 and D1.

The
next time A1 = 10 and B1 = 11. I want these values inserted into

cells C2
and D2 and so on. So what ever I insert into cells A1 and B1 it

contantly
archives the information into cells C1 and D1 and down. Please

help!!!





  #5   Report Post  
Hammer
 
Posts: n/a
Default

Thank You very much. It works!!! This exactly what I was after.

Thanks!
John

"Gord Dibben" <gorddibbATshawDOTca wrote in message
...
John

If you want the VBA, try this.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
On Error GoTo stoppit
Application.EnableEvents = False
If Target.Address = "$A$1" And Target.Value < "" _
And IsNumeric(Target.Value) Then
ActiveSheet.Cells(Rows.Count, 3).End(xlUp) _
.Offset(1, 0).Value = Target.Value
End If
If Target.Address = "$B$1" And Target.Value < "" _
And IsNumeric(Target.Value) Then
ActiveSheet.Cells(Rows.Count, 4).End(xlUp) _
.Offset(1, 0).Value = Target.Value
End If
stoppit:
Application.EnableEvents = True
End Sub


NOTE: it will place first two numbers from A1 and B1 into C2 and D2

Just delete C1 and D1(shift cells up) and then you're good to go from then

on.

Right-click on your sheet tab and select "View Code". Copy the above code
into the module that opens.

Gord Dibben Excel MVP

On Tue, 2 Nov 2004 13:44:06 -0500, "John Hunt" wrote:

That is what I was afraid of. Thanks for the reassurance though.

"Frank Kabel" wrote in message
...
Hi
this is not possible using formulas alone. This would require VBA

--
Regards
Frank Kabel
Frankfurt, Germany

"John Hunt" schrieb im Newsbeitrag
...
If I have two cells say A1 and B1 and I always use these cells to
input my
data. How can I archive this information to another cell. For
example: If
A1 = 5 and B1 = 6 and I want this information inserted in C1 and D1.
The
next time A1 = 10 and B1 = 11. I want these values inserted into
cells C2
and D2 and so on. So what ever I insert into cells A1 and B1 it
contantly
archives the information into cells C1 and D1 and down. Please
help!!!







Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:09 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"