View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Debra Dalgleish
 
Posts: n/a
Default Any way to center a graphic in a particular cell?

Assuming the graphics are narrower than the columns, you could use code
similar to the following:

'====================
Sub CentreGraphics()
Dim shp As Shape
For Each shp In ActiveSheet.Shapes
shp.Left = shp.TopLeftCell.Left _
+ (shp.TopLeftCell.Width - shp.Width) / 2
Next shp
End Sub
'=====================

metalsped wrote:
Well this is for work, so it needs to be professional looking. Provided
I dont have to write an encyclopedia worth of commands for every box, I
would love to try out the program (if you know it). Thanks

Debra Dalgleish Wrote:

Graphics float over cells, so they aren't affected by cell formatting.
You could use programming to centre the graphics, but there's no
built-in command that will centre them.

metalsped wrote:

I have a small graphic that I need into insert to every applicable


cell,

in a certain column. Is there any sort of way that excel can be
formatted to have this graphic be centered in each cell? It is quite
tough to keep everything centered by hand. Thanks!




--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html






--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html