gtd526
Well-known Member
- Joined
- Jul 30, 2013
- Messages
- 684
- Office Version
- 2019
- Platform
- Windows
Hello,
I'm using the following VBA code to identify "?" in a certain cell, which is working.
I'd rather just select that identified cell (containing "?") rather that add the text to Column "D".
There will only be a single cell containing "?".
thank you
I'm using the following VBA code to identify "?" in a certain cell, which is working.
I'd rather just select that identified cell (containing "?") rather that add the text to Column "D".
There will only be a single cell containing "?".
thank you
VBA Code:
Sub Test()
Dim i As Integer
For i = 1 To 10
If InStr(1, LCase(Range("B" & i)), "?") <> 0 Then
Result = "Contains ?????"
Else
Result = "Does Not Contain ?????"
End If
Range("D" & i) = Result
Next i
End Sub
NBA.xlsm | ||||||
---|---|---|---|---|---|---|
A | B | C | D | |||
1 | Rank | Criteria2 | Criteria2 Percentage | Does Not Contain ????? | ||
2 | 1 | Rank2, AL & AM >60% | 75.7% | Does Not Contain ????? | ||
3 | 15 | Q>=60%, S>=6 | 54.3% | Does Not Contain ????? | ||
4 | 37 | K,L,Q,R>0,X,AC | 36.6% | Does Not Contain ????? | ||
5 | #VALUE! | ?????????????????? | Contains ????? | |||
6 | #VALUE! | Your Choice | Does Not Contain ????? | |||
7 | #VALUE! | Your Choice | Does Not Contain ????? | |||
8 | Does Not Contain ????? | |||||
9 | Does Not Contain ????? | |||||
10 | Does Not Contain ????? | |||||
Sheet1 |