Difference between revisions of "Cell Wrap"
Jump to navigation
Jump to search
imported>Bob |
imported>Bob |
||
Line 1: | Line 1: | ||
− | Copy and paste the text in the box into the visual basic editor that comes with Excel. To get access to personal.xls in the visual basic editor check out this article: [[ | + | Copy and paste the text in the box into the visual basic editor that comes with Excel. To get access to personal.xls in the visual basic editor check out this article: [[Save Macros in Excel]] |
− | This short macro does a cell reformat making the cell text do a word wrap within the cell so you can see it all. Useful for long column headers when you're working with time series data such as met or soil climate data. | + | This short macro does a cell reformat making the cell text do a word wrap within the cell so you can see it all. Useful for long column headers when you're working with time series data such as met or soil climate data. Once you've added this macro to your library you may also find it useful to create a [[tool bar button|menu button]] for it |
option explicit | option explicit |
Revision as of 11:27, 12 March 2008
Copy and paste the text in the box into the visual basic editor that comes with Excel. To get access to personal.xls in the visual basic editor check out this article: Save Macros in Excel
This short macro does a cell reformat making the cell text do a word wrap within the cell so you can see it all. Useful for long column headers when you're working with time series data such as met or soil climate data. Once you've added this macro to your library you may also find it useful to create a menu button for it
option explicit Sub Cell_Wrap() ' This shorty macro does the wrap text f(x) for cells so you can ' see what's in cells with lots of text. ' With Selection .HorizontalAlignment = xlGeneral .VerticalAlignment = xlBottom .WrapText = True .Orientation = 0 .AddIndent = False .IndentLevel = 0 .ShrinkToFit = False .ReadingOrder = xlContext .MergeCells = False End With End Sub