IF, Else function

  • Thread starter Thread starter sby
  • Start date Start date
S

sby

Hi

I am a bit stuck, I want to update a worksheet but keep previous data in
another column but I am stuggling to find a way.
What i want to do is, A1 has my present data and when I update that data I
want the old data to automatically move to B1. This will enable me to keep
both the present and previous data without cutting and pasting data.

Can anyone help.


Regards

Steve
 
Select the cells that are important to you. Under the Edit toolbar, click
copy, and then right-click in Cell B1, click paste special, and then click
values. I think this will give you what you want...but it doesn't require an
If/Else function...

Well, I hope that works for you.


Regards,
Ryan--
 
Thanks for that but I was looking for an automated system as they are
numerous cells.

Can anyone help.
 
Hide Column C,(or some other column and alter the code to suit then enter
the following in a sheet module:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)

If Intersect(Target, Range("A:A")) Is Nothing Then Exit Sub

Application.EnableEvents = False
Cells(Target.Row, 2).Value = Cells(Target.Row, 3).Value
Cells(Target.Row, 3).Value = Cells(Target.Row, 1).Value
Application.EnableEvents = True

End Sub


--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 
If you right-click in A1, it will give you the option to Insert & shift
cells right.
 
Back
Top