ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   worksheet change (https://www.excelbanter.com/excel-programming/380802-re-worksheet-change.html)

londoned

worksheet change
 
I'm sorry, I messed up the examples.
They should read like this.....

if the value in B11=value in B34 then A34=A11, C34=C11 and E34=E11
If the value in B15= value in B30 then A30 = A15, C30 = C15 and E30= E15
If the value in B9= value in B30 then A30 = A9, C30 = C9 and E30= E15

The code should look to see if the value of a cell in the B column of
section one matches the value of a cell in the B column of section two.
If value matches then the values of the cells in the A, C and E columns of
section one are are carried down to A, C and E columns of section two.

Hope this clears things up.

"londoned" wrote in message news:...
Any help on this? I'll 'scale' it up for my own needs later.
At the moment I have a macro for each cell in the b column of section one
comparing to cells in b column of section two that uses lots of 'If',
'Then' and 'ElseIf' fired by a worksheet change in section one. Coding to
make this work is huge, inefficient and prone to typo errors.

There are two sections on worksheet.
Section one range is A10:E20
Section two range is A30:E40

Can you explain how to use loops, variables and worksheet change to make
the following happen?
If there is a match between the values in the B column in both sections
then the values from from corresponding rows are are carried down.

Examples:

If the value in B11= value in B34 then A34 = A11, C34 = C11 and E34 = C11
If the value in B15= value in B30 then A30 = A15, C30 = C15 and E34= C15









All times are GMT +1. The time now is 02:03 AM.

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