View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
OZDOC1050
 
Posts: n/a
Default How to create/run "cell A equals Cell B put Cell C info in Cell D

Sub CTOX()
Application.ScreenUpdating = False
Range("A1").Select
Do Until ActiveCell.Value = ""
If ActiveCell.Value = ActiveCell.Offset(0, 1).Value Then
ActiveCell.Offset(0, 23).Value = ActiveCell.Offset(0, 2).Value
End If
ActiveCell.Offset(1, 0).Select
Loop
Range("A1").Select
Application.ScreenUpdating = True
End Sub

This is if all 5000 in the column A are together with no breaks, it can be
adjusted to suit if there are breaks.

R
Pete

--
(][ THIS EMAIL HAS BEEN SCANNED BY NORTON ANTIVIRUS ][)
"abmb161" wrote in message
...
I need to match data in cell A to cell B and then if they equal I need to
copy the adjacent cell C to cell X . How do I set up a macro to do this
automatically? I have over 5000 cells to compare and match up.. Can anyone
help? I have Office 2003.