Compare and copy

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello everyone
I have an excel price list where i need to compare the active cell with the
one immediately below and then if they are equal copy the 4 columns adjacent
to the active cell into the row immediatley below. If they are not equal then
do nothing. I hope the figures below help explain my needs.

$4,789,00 123.09 65.00 45.00 76.00 12.00
$4789.00

Many Thanks in advance
 
Hi, with the help of a functions it is not possible you need to create your
own function.
 
Paste following macro into a Module

Sub FillIt()
Dim rng As Range
With ActiveCell
If .Value = .Offset(1, 0).Value Then
Set rng = .Offset(0, 1).Resize(1, 4)
rng.Offset(1, 0).Value = rng.Value
End If
End With
End Sub

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top