![]() |
Macro Help
Hi, besides the other problem I posted today, I am also having trouble
creating a macro since I cannot write code. What I would like is a macro that says if there is a filled in cell from A6:A50 (if it is filled would have an employee's name) then look up each employee name in a table in another sheet (A3:Y50) and, for each name/employee, if the value of the cell 4 cells to the right of the name in the table displays "Actif" to put "8" in same row as the employee's name in initial sheet in column D, if it displays "Retraité" to put "RET", and if it displays "Terminé" to diaplay "TER" I have no idea if that is a complicated macro, any feedback/help would be great. Thanks |
Macro Help
try this
Sub makecategories() For Each c In Range("a6:a50") Select Case UCase(c.Offset(, 4)) Case "ACTIF": x = 8 Case "RETRAITE": x = "RET" Case "TERMINE": x = "TER" 'etc Case Else: x = "" End Select c.Offset(, 5) = x Next c End Sub -- Don Guillett SalesAid Software "Daniel" wrote in message ... Hi, besides the other problem I posted today, I am also having trouble creating a macro since I cannot write code. What I would like is a macro that says if there is a filled in cell from A6:A50 (if it is filled would have an employee's name) then look up each employee name in a table in another sheet (A3:Y50) and, for each name/employee, if the value of the cell 4 cells to the right of the name in the table displays "Actif" to put "8" in same row as the employee's name in initial sheet in column D, if it displays "Retraité" to put "RET", and if it displays "Terminé" to diaplay "TER" I have no idea if that is a complicated macro, any feedback/help would be great. Thanks |
All times are GMT +1. The time now is 09:09 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com