horizonflame
Board Regular
- Joined
- Sep 27, 2018
- Messages
- 184
- Office Version
- 2013
Hi there
I am after some help with searching for a string. If the value in column L is found anywhere in cell A9 I want to enter the cell value (currently a formula). If the value is not found then change the cell to blank.
I've tried the below but it just makes all cells blank!
Your help is appreciated, thank you.
I am after some help with searching for a string. If the value in column L is found anywhere in cell A9 I want to enter the cell value (currently a formula). If the value is not found then change the cell to blank.
I've tried the below but it just makes all cells blank!
Your help is appreciated, thank you.
VBA Code:
With Sheets("Data")
For each cell in .Range("L2:L" & LR1)
If cell.value Like "*" & .Range("A9").value Then
cell.value = cell.value
Else
cell.value = ""
Next cell