Macro Help

G

Guest

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
 
D

Don Guillett

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
 

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

Top