(Solved) – Select the cell that your if statement triggers at and select that cell in vba

  • by

Fairly new to VBA.

I’m trying search a column for a specific value, and then select that cell in order to cut and move it.

All i have right now is:

Dim cel As Range

Sub Opdaterstatus()

For Each cel In Range("H1:H100")
    If cel.value = "Fakturering" Then

        MsgBox (cel.value)

    End If

Next cel

End Sub

This finds the cells i want, but my problem is targeting the actual cell the if statement triggers on. There is hopefully and most likely an easy way to achieve this.
The MsgBox is purely for testing purposes.

Leave a Reply

Your email address will not be published. Required fields are marked *