Join 3,439 readers in helping fund MetaFilter (Hide)

Tags:

Excel, Creating text with a colored rectangle
February 2, 2014 9:40 AM   Subscribe

Could anyone provide me guidance with a subroutine that would paste text within a colored rectangle within an Excel document? Thanks, Ken
posted by estudioken to Computers & Internet (2 answers total)
 
First paste your text into Excel.

Then select the cell you want to have a border around it and choose Borders -> More Borders (Screenshot)

From this window (screenshot) you can choose exactly the style and color of border that you want.
posted by JDHarper at 10:11 AM on February 2


This is how you add a shape with text via vba

http://stackoverflow.com/questions/18794259/add-shape-to-range-addshape-method

Pasting can be as easy as selecting that shape and doing a Selection.paste or Selection.pastespecial + parameters

But depending on where the text comes from, etc. it can get more complex than it should. DoEvents might be useful in that case.

http://support.microsoft.com/kb/118468
posted by magullo at 10:56 AM on February 2


« Older I work in the public sector an...   |  YANMD but should I see one? S... Newer »

You are not logged in, either login or create an account to post comments