Check if cell contains shape

dummies

New Member
Joined
Jul 10, 2020
Messages
28
Office Version
  1. 2016
Platform
  1. Windows
I would be grateful if someone could help me to check if cell contains shapes.
In a cell their is word called “present and absent ” if present is circled, then display “present ” in another sheet range h27 and if “absent ” is circled than display absent but If cell does not contain any shape (I mean if both the present and absent is not circled than display nothing on h27) than display nothing on h27 .
I tried to in that way but it is not taking me anywhere .so I will be very grateful if someone could point me into right direction.
Thank you so much .
<quote >
If ws.Range("H27").Shapes.Count > 0 Then
InputArr(tenure.attendance ).Value = "present"
Else
If ws.Range("H27").Shapes.Count = 0 Then
InputArr(tenure.attendance ).Value = "absent"
End If
</quote >
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
To be honest you are best to rethink your approach. I cant see this way being successful from what you have said. Use the words 'present' or 'absent' in the cell and test that would be my advice.
 
Upvote 0
To be honest you are best to rethink your approach. I cant see this way being successful from what you have said. Use the words 'present' or 'absent' in the cell and test that would be my advice.
Thank you for the response.I don’t know why but it is not working.
I saw some using the position of the shape like if shape is on the right side then display present and if shape is left side of the cell then absent but I am lost while using the position object of the shapes .
 
Upvote 0
Its possible to determine the size and position of a shape on the worksheet. Its possible to determine the size and position of a cell on the worksheet. But what exactly does on the right side mean? Wholly right? Mostly right? Doesnt cross the upper boundary of the cell? Doesnt cross the lower boundary of the cell? What to do if it does. How is the shape being created on the worksheet? How will the code refer to it? Like i say i think too many pitfalls without knowing more. Lot simpler to just type either 'present' or 'absent' in a cell.
 
Upvote 0

Forum statistics

Threads
1,214,932
Messages
6,122,323
Members
449,077
Latest member
jmsotelo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top