Aligning shapes in the Cell

gnaga

Well-known Member
Joined
Jul 9, 2002
Messages
748
Office Version
  1. 365
  2. 2016
  3. 2013
Platform
  1. Windows
I would like to draw a shape (for ex. Smily Face) in a cell and want to align with the cell like formating a text in the cell. Horizontally and vertically center and if cell changes this (shape) also shoud get adjust it to the cell size. Is this possible?
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Objects in XL do not fit into a cell; instead, they 'float' in a layer above the cells layer. Consequently, it is not possible -- without an incredible amount of work -- to make an object appear as though it is part of the text within a cell.

That said, XL does support some rudimentary shape position and size relative to the underlying cell. Double click the object and select the Properties tab.

gnaga said:
I would like to draw a shape (for ex. Smily Face) in a cell and want to align with the cell like formating a text in the cell. Horizontally and vertically center and if cell changes this (shape) also shoud get adjust it to the cell size. Is this possible?
 
Upvote 0
Thanks for both of you.

In Draw option in the drawing toolbar has some options for aligning the shape but it is not gettting enabled even I select the shape object. I do not know how to make them enable.

Tushar, If I copy & paste an exisiting shape, it is not getting pasted into my deisred location but close to the copied shape. How to move this shape object into a desired location in the worksheet?
 
Upvote 0
For a shape taken created by using the Excel Drawing toolbar, or for an image or picture that has been pasted, click on top of the shape or picture. You should see the eight little sizing squares, and the cursor turns into a four-arrow shape. Just click and hold down the left mouse button, and drag the shape where you want it, then, release the mouse button. That's it!
 
Upvote 0
Ralph Thanks. I am aware of the technique you have suggested. I wanted to copy the shape or image and then I want to paste it in a location thorugh VBA. Is the worksheet has any dimension based on pixels to place the image into a particular location?
 
Upvote 0
Code:
Sub testIt()
    With ActiveSheet.Shapes(1)
    .Height = .Height / 2
    .Width = .Width / 2
    .Left = Range("c1").Left
    .Top = Range("c1").Top
        End With
    End Sub
 
Upvote 0
Tushar Thank you very much. This is the one I was looking for. Now I can manipulate with this to complete my work.
 
Upvote 0
Code:
Sub testIt()
    With ActiveSheet.Shapes(1)
    .Height = .Height / 2
    .Width = .Width / 2
    .Left = Range("c1").Left
    .Top = Range("c1").Top
        End With
    End Sub
Perfect! this is also just what I needed, Tusharm, thank you!
 
Upvote 0

Forum statistics

Threads
1,223,431
Messages
6,172,069
Members
452,444
Latest member
ShaImran193

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