RockandGrohl
Well-known Member
- Joined
- Aug 1, 2018
- Messages
- 801
- Office Version
- 365
- Platform
- Windows
Hello, thought the below would work but it skips over applicable lines
Say the tourno variable is "ABC123", we have lines that are "ABC123-H01" and "ABC123-H02"
These lines are skipped over, but they should be applicable. If I change the criteria to "tourno & "-H01" for instance, it works perfectly.
What I'm trying to do is take a 6-digit variable, and then find all the strings where the 6-digit variable has a H-number string after it (whether it be -H01, -H02 etc)
Cheers.
VBA Code:
Do Until Cells(ActiveCell.Row, "A").Value = "" Or Cells(ActiveCell.Row, "A").Value = tourno & "-H*"
Say the tourno variable is "ABC123", we have lines that are "ABC123-H01" and "ABC123-H02"
These lines are skipped over, but they should be applicable. If I change the criteria to "tourno & "-H01" for instance, it works perfectly.
What I'm trying to do is take a 6-digit variable, and then find all the strings where the 6-digit variable has a H-number string after it (whether it be -H01, -H02 etc)
Cheers.