ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Speed button to wrap text (https://www.excelbanter.com/excel-worksheet-functions/130091-speed-button-wrap-text.html)

Sanjay Shah

Speed button to wrap text
 
Is there any way to create a speed button to wrap / unwrap text in Excel
without having to go through - Format Cells, Alignment Tab, Wrat Text?

Thanks in advance for the help
--
Sanjay Shah

Newbeetle

Speed button to wrap text
 
Hi

Record a macro,

On your sheet select "Tools" then "Macro" then "Record New Macro"

On the popup screen put a letter as in the blankbox next to Ctrl+ as this
will be your shortcut, then click ok.

Right mouse click the blank box above row 1 next to A, then right mouse
click, and do the format cells, alignment, check Wrap, then click A1 on your
sheet.

On the screen should be a small popup click the stop recording button.

Ok now do the same again but to unwrap, make the shortcut letter different
to the one used before.

Ok say you used letter shortcuts w to wrap and u to unwrap,

on your sheet do ctrl+w the sheet will wrap
do ctrl+u the sheet will unwrap.

The short cuts will work on each sheet your on.

Hope that helps.

--
This post was created using recycled electrons!


"Sanjay Shah" wrote:

Is there any way to create a speed button to wrap / unwrap text in Excel
without having to go through - Format Cells, Alignment Tab, Wrat Text?

Thanks in advance for the help
--
Sanjay Shah


Gord Dibben

Speed button to wrap text
 
Sanjay

Sub Wrap_Text()
With Selection
.WrapText = Not .WrapText
End With
End Sub

Toggles on/off.

Copy/paste to a general module in your workbook or Personal.xls and assign it to
a button.


Gord Dibben MS Excel MVP

On Fri, 9 Feb 2007 11:25:01 -0800, Sanjay Shah
wrote:

Is there any way to create a speed button to wrap / unwrap text in Excel
without having to go through - Format Cells, Alignment Tab, Wrat Text?

Thanks in advance for the help



Sanjay Shah

Speed button to wrap text
 
Thank you very much Gord Dibben

I have tried this and it works exactly as you described it. This will save
me a lot of time.
--
Sanjay Shah


"Gord Dibben" wrote:

Sanjay

Sub Wrap_Text()
With Selection
.WrapText = Not .WrapText
End With
End Sub

Toggles on/off.

Copy/paste to a general module in your workbook or Personal.xls and assign it to
a button.


Gord Dibben MS Excel MVP

On Fri, 9 Feb 2007 11:25:01 -0800, Sanjay Shah
wrote:

Is there any way to create a speed button to wrap / unwrap text in Excel
without having to go through - Format Cells, Alignment Tab, Wrat Text?

Thanks in advance for the help




Gord Dibben

Speed button to wrap text
 
Thanks for the feedback Sanjay.


Gord

On Mon, 12 Feb 2007 02:08:00 -0800, Sanjay Shah
wrote:

Thank you very much Gord Dibben

I have tried this and it works exactly as you described it. This will save
me a lot of time.




All times are GMT +1. The time now is 01:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com