If I have images through B1:B10 and values in A1:A10, what's the best way to delete all images and left value whilst keeping all the values in C onwards to remain in the exact same place?
I only want to delete adjacent cell if an image is there so something like this but this really messes up the sheet lol.
Before macro
A1 Value B1 Image C1 1
A2 Value B2 Blank C2 2
A3 Value B3 Image C3 3
A4 Value B4 Blank C4 4
Finished result
A1 Value B1 Blank C1 1
A2 Value B2 Blank C2 2
A3 Blank B3 Blank C3 3
A4 Blank B4 Blank C4 4
I only want to delete adjacent cell if an image is there so something like this but this really messes up the sheet lol.
Before macro
A1 Value B1 Image C1 1
A2 Value B2 Blank C2 2
A3 Value B3 Image C3 3
A4 Value B4 Blank C4 4
Finished result
A1 Value B1 Blank C1 1
A2 Value B2 Blank C2 2
A3 Blank B3 Blank C3 3
A4 Blank B4 Blank C4 4
Sub getLocation()
Dim wks As Worksheet
Set wks = Sheets("Sheet1")
For Each sshapes In wks.Shapes
x = sshapes.TopLeftCell.Row
wks.Cells(x, 2).Offset(0, -1).Delete
sshapes.Delete
Next
End Sub