Sheet 2
A1=10
A2=20
A3=30
A4=40
A5=50---etc(Values are not constant)
By using this code the shape is appeared after every 5 columns ...
if there is a box(shape) position appeared at 5th column then
match with that box(shape) and add one more box(Shape) above this "Arrow2" box as well as insert the text with A1 Cell name
Please find the link below
https://drive.google.com/file/d/1h78WukYH0eDehj8As4u-dHkodMybLUN-/view
i am looking for a macro with if condition
A1=10
A2=20
A3=30
A4=40
A5=50---etc(Values are not constant)
By using this code the shape is appeared after every 5 columns ...
if there is a box(shape) position appeared at 5th column then
match with that box(shape) and add one more box(Shape) above this "Arrow2" box as well as insert the text with A1 Cell name
Please find the link below
https://drive.google.com/file/d/1h78WukYH0eDehj8As4u-dHkodMybLUN-/view
i am looking for a macro with if condition
Code:
Sub populatearrow()
Dim shapi As Shape
Set shapi = Sheets("Sheet2").Shapes("Arrow2")
Dim shap As Shape
Dim x
Dim position
position = shapi.Left
For x = 2 To 11
Set shap = Sheets("Sheet2").Shapes.AddShape(shapi.AutoShapeType, position + Sheets("Sheet2").Cells(1, 2).Width * 5, shapi.Top, shapi.Width, shapi.Height)
shap.Visible = True
position = shap.Left
Set shap = Nothing
Next
Set shapi = Nothing
End Sub
Last edited: