Charlie987
New Member
- Joined
- Jul 25, 2020
- Messages
- 25
- Office Version
- 365
- Platform
- Windows
Hi,
I am trying to create an if statement that tests if a name is present and if so, inserts an image into a cell in that row. the image can be in a cell on that sheet (if that is the easiest way to do it).
so far i have:
Dim rng As Range
Set rng = ActiveSheet.Range("A3:A300")
For Each cell In rng.Cells
If InStr(1, cell, "John") > 0 And InStr(1, cell.Offset(0, 1), "Smith") Then
cell.Offset(0, 4).Value = "????????"
End If
Next
I am just not sure how to reference the image to use it.
Thanks
I am trying to create an if statement that tests if a name is present and if so, inserts an image into a cell in that row. the image can be in a cell on that sheet (if that is the easiest way to do it).
so far i have:
Dim rng As Range
Set rng = ActiveSheet.Range("A3:A300")
For Each cell In rng.Cells
If InStr(1, cell, "John") > 0 And InStr(1, cell.Offset(0, 1), "Smith") Then
cell.Offset(0, 4).Value = "????????"
End If
Next
I am just not sure how to reference the image to use it.
Thanks