I have a file with only 1 worksheet that contains all text. I am looking for a VBA solution to loop through column 'D' in my example to look for groups of text that are not empty. Next, I need to determine if each group of text contains only 3/8" or if the group has text that would be a larger value if it were numerical (if it wasn't text), such as 1/2", 5/8", 3/4", 7/8", 1", etc. If the group contains any higher value than 3/8", everything in that particular group is kept, but if the group only contains 3/8", columns B, C, and D for that group would be deleted. The example data below hopefully illustrates what I'm trying to do. Thank you in advance.
Book1.xlsm | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | |||
1 | Line | Original | Expected Results for Cols B,C,D | |||||||
2 | 1 | text | text | 3/8" | ||||||
3 | 2 | |||||||||
4 | 3 | text | text | 3/8" | text | text | 3/8" | |||
5 | 4 | text | text | 3/8" | text | text | 3/8" | |||
6 | 5 | text | text | 5/8" | text | text | 5/8" | |||
7 | 6 | text | text | 1/2" | text | text | 1/2" | |||
8 | 7 | text | text | 3/8" | text | text | 3/8" | |||
9 | 8 | |||||||||
10 | 9 | text | text | 3/8" | ||||||
11 | 10 | text | text | 3/8" | ||||||
12 | 11 | |||||||||
13 | 12 | text | text | 7/8" | text | text | 7/8" | |||
14 | 13 | |||||||||
15 | 14 | |||||||||
16 | 15 | text | text | 3/4" | text | text | 3/4" | |||
17 | 16 | text | text | 3/8" | text | text | 3/8" | |||
18 | 17 | text | text | 3/8" | text | text | 3/8" | |||
19 | 18 | |||||||||
Sheet1 |