Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Recording changed cells in the same sheet

What I need to do is this:

I have two column of data, the first has numbers and the second is
blank. If I change anything in the first column I need the old value
to appear in the second column automatically. What would be the
easiest way to accomplish this?

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 695
Default Recording changed cells in the same sheet

put in sheet code-module (column A1:A100 is target B is dest.) change if..

Dim x, cl

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("A1:A100")) Is Nothing Then Exit Sub
Target.Offset(0, 1) = x
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
x = ActiveCell.Value
End Sub


"unlucky" skrev:

What I need to do is this:

I have two column of data, the first has numbers and the second is
blank. If I change anything in the first column I need the old value
to appear in the second column automatically. What would be the
easiest way to accomplish this?


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Recording changed cells in the same sheet

That worked completely and perfectly. Thanks very much!

On Jun 12, 4:41 pm, excelent
wrote:
put in sheet code-module (column A1:A100 is target B is dest.) change if..

Dim x, cl

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("A1:A100")) Is Nothing Then Exit Sub
Target.Offset(0, 1) = x
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
x = ActiveCell.Value
End Sub

"unlucky" skrev:

What I need to do is this:


I have two column of data, the first has numbers and the second is
blank. If I change anything in the first column I need the old value
to appear in the second column automatically. What would be the
easiest way to accomplish this?



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


Similar Threads
Thread Thread Starter Forum Replies Last Post
sheet background color suddenly changed to light green from normal Dan Excel Discussion (Misc queries) 0 March 28th 07 03:22 PM
How do i recover original excel sheet that was changed and saved mcf Excel Discussion (Misc queries) 2 January 31st 07 08:33 AM
How do I make the Stop Recording bar pop up when recording macros J Excel Worksheet Functions 1 January 10th 06 08:46 PM
The columns names on my sheet have changed!! so_moody Excel Discussion (Misc queries) 2 August 15th 05 12:16 PM
How do I have a macro format cells while recording? TD Excel Worksheet Functions 1 May 12th 05 04:32 PM


All times are GMT +1. The time now is 11:23 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"