Hi,

Another little Excel roadblock for me today. Can someone help me out? My problem is described in the simple code below. Thanks!

Sub Checkloop()

'This sub presents a value in a specific cell based on the value in the cell before it.
'The only problem is that I want the loop to check if the specified cell *contains* a certain text. Right now it only works
'if the specified cells are exactly equal to the texts gives below. How do I change the code so that it properly checks if the cell contains a value
'Example: If a cell A1 contains"ORT on monday and wednesday" I want this cell to be recognised based on the fact that it contains the letter "ORT"
'PLEASE HELP!

    Do
        If ActiveCell.Offset(0, -1) = "ORT" Then
               ActiveCell.Value = "ORT"
               
    ElseIf ActiveCell.Offset(0, -1) = "Urgent WZ" Then
               ActiveCell.Value = "URGENT"
        
    ElseIf ActiveCell.Offset(0, -1) = "SPOED AH" Then
               ActiveCell.Value = "SPOED"
               
    ElseIf ActiveCell.Offset(0, -1) = "HEE WZ" Then
               ActiveCell.Value = "HEE"

        Else
            ActiveCell.FormulaR1C1 = "Nothing's up"
            
    End If

    ActiveCell.Offset(1, 0).Select

'define until which cell to loop
    Loop Until IsEmpty(ActiveCell.Offset(0, -1))
    
End Sub