ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Help with macro (https://www.excelbanter.com/excel-programming/423884-help-macro.html)

richzip

Help with macro
 
I would like to know if a macro can be set up to perform the following: I
have a large workbook with data for several employees, and each employee
number (column A) has at least 1 line for every date of the month.

If any of the rows for each employee has a certain value (RSV) in column C,
I would like to copy that value over to column D. For example: employee 123
has the code RSV in column C for one of his rows, so I would like to copy all
values in column C (for that employee), to the corresponding row in column D.
Employee 456 does not have the code RSV for any rows, so column D for that
employee is left alone.

Original:
A B C D
123 1/1 OFF OFF
123 1/2 OFF aaaa
123 1/3 RSV bbbb
456 1/1 xxxx xxxx
456 1/2 OFF OFF


Result:
A B C D
123 1/1 OFF OFF
123 1/2 OFF OFF
123 1/3 RSV RSV
456 1/1 xxxx xxxx
456 1/2 OFF OFF



All times are GMT +1. The time now is 05:24 PM.

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