I have a survey report in Excel 2010 which return a ’tick’ in picture form (pictures are in sequential form – Picture 1, Picture 2 etc).
I need to convert tick to text or value of some kind so that I can use Excel function ‘CountA’ to count the entries in each horizontal line.
This question has previously been answered on the Forum on July 10, 2013 by Narayank991 who suggested:
As I am a new learner in VB, I have the following questions:
1) How do I specify the range to use in my Excel Worksheet and where do I insert it in the listed code.
2) If I run the code above it shows a syntax error in line 2 - Const Replace_Text = "OK" How do I correct this syntax error?
Any help would be much appreciated.
I need to convert tick to text or value of some kind so that I can use Excel function ‘CountA’ to count the entries in each horizontal line.
This question has previously been answered on the Forum on July 10, 2013 by Narayank991 who suggested:
Code:
Public Sub Replace_Picture()
Const Replace_Text = "OK"
Dim shp as Shape
For Each shp In ActiveSheet.Shapes
If shp.TopLeftCell.Address = shp.BottomRightCell.Address Then
shp.TopLeftCell.Value = Replace_Text
shp.Delete
End If
Next
Set shp = Nothing
End Sub
As I am a new learner in VB, I have the following questions:
1) How do I specify the range to use in my Excel Worksheet and where do I insert it in the listed code.
2) If I run the code above it shows a syntax error in line 2 - Const Replace_Text = "OK" How do I correct this syntax error?
Any help would be much appreciated.
Attachments
Last edited by a moderator: