Hi, i have the following code in one of my macros which is not working correctly. Because "_new" will appear within both elseif statments the "_newreb" part is being ignored.
Hope this make sense!
ElseIf InStr(ActiveCell.Text, "_NEW") Then
Range("D" & X).Value = "_NEW"
Range("D" & X).Interior.ColorIndex = 3
Range("D" & X).Font.Bold = True
Range("E" & X).Value = "PC146"
ElseIf InStr(ActiveCell.Text, "_NEWREB") Then
Range("D" & X).Value = "_NEWREB"
Range("D" & X).Interior.ColorIndex = 44
Range("D" & X).Font.Bold = True
Range("E" & X).Value = "PC145"
Please can anyone help!!!
Kindest regards,
Brian
Hope this make sense!
ElseIf InStr(ActiveCell.Text, "_NEW") Then
Range("D" & X).Value = "_NEW"
Range("D" & X).Interior.ColorIndex = 3
Range("D" & X).Font.Bold = True
Range("E" & X).Value = "PC146"
ElseIf InStr(ActiveCell.Text, "_NEWREB") Then
Range("D" & X).Value = "_NEWREB"
Range("D" & X).Interior.ColorIndex = 44
Range("D" & X).Font.Bold = True
Range("E" & X).Value = "PC145"
Please can anyone help!!!
Kindest regards,
Brian