Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() 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! -- metalsped ------------------------------------------------------------------------ metalsped's Profile: http://www.excelforum.com/member.php...o&userid=22824 View this thread: http://www.excelforum.com/showthread...hreadid=539392 |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() Yay, pity bump. -- metalsped ------------------------------------------------------------------------ metalsped's Profile: http://www.excelforum.com/member.php...o&userid=22824 View this thread: http://www.excelforum.com/showthread...hreadid=539392 |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() 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 -- metalsped ------------------------------------------------------------------------ metalsped's Profile: http://www.excelforum.com/member.php...o&userid=22824 View this thread: http://www.excelforum.com/showthread...hreadid=539392 |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() I feel quite silly asking, but where exactly in my excel sheet do I put code like that? ![]() -- metalsped ------------------------------------------------------------------------ metalsped's Profile: http://www.excelforum.com/member.php...o&userid=22824 View this thread: http://www.excelforum.com/showthread...hreadid=539392 |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Store the code in a regular code module, as described he
http://www.contextures.com/xlvba01.html To run the code, you can choose ToolsMacroMacros Select the CentreGraphics macro in the list, then click the Run button. metalsped wrote: I feel quite silly asking, but where exactly in my excel sheet do I put code like that? ![]() -- Debra Dalgleish Contextures http://www.contextures.com/tiptech.html |
#8
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() I'm halfway there. Thank you thus far Debra. It appears with that coding, that it is centered vertically. Is there any way to have it centered horizontally as well? -- metalsped ------------------------------------------------------------------------ metalsped's Profile: http://www.excelforum.com/member.php...o&userid=22824 View this thread: http://www.excelforum.com/showthread...hreadid=539392 |
#9
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi metalsped,
try... Sub CentreGraphics() Dim shp As Shape For Each shp In ActiveSheet.Shapes shp.Left = shp.TopLeftCell.Left _ + (shp.TopLeftCell.Width - shp.Width) / 2 shp.Top = shp.TopLeftCell.Top _ + (shp.TopLeftCell.Height - shp.Height) / 2 Next shp End Sub Ken Johnson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I "lock" a graphic to a particular cell in Excel? | Excel Worksheet Functions | |||
Referencing a cell containing a graphic | Excel Discussion (Misc queries) | |||
Dates of a Day for a month & year cell formulas | Excel Discussion (Misc queries) | |||
copying cell names | Excel Discussion (Misc queries) | |||
Copy cell format to cell on another worksht and update automatical | Excel Worksheet Functions |