ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Compare and copy (https://www.excelbanter.com/excel-discussion-misc-queries/81806-compare-copy.html)

AJM1949

Compare and copy
 
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
--
AJM1949

Sridhar

Compare and copy
 
Hi, with the help of a functions it is not possible you need to create your
own function.

"AJM1949" wrote:

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
--
AJM1949


Ardus Petus

Compare and copy
 
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
--
AP

"AJM1949" a écrit dans le message de
...
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
--
AJM1949





All times are GMT +1. The time now is 12:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com