1

A situation that occurs for me multiple times a day is that I have multiple lines of text in, say, notepad that I would like to store in a single Excel cell. So I copy it from the other application, select the cell I want to paste it into and paste the text directly into the formula bar for that cell.

This stores all the text in the single cell, however Excel automatically expands that row to a huge size and auto-sets the Alignment > Wrap Text value to true and I have to manually select the cell and change the Alignment > Wrap Text value back to False.

I'm curious to know if there is a way / setting to change in Excel so that it won't auto-change the formatting in such a situation.

Any ideas / help?

Thanks!

1 Answers1

0

I found a way to do it with using a VBA trigger on a specific worksheet.

You need to select the sheet you want to be performed and select the trigger "Change"

Then you need to write the following macro:

Private Sub Worksheet_Change(ByVal Target As Range)

Worksheets("Sheet1").Range("A1:A10").WrapText = False

End Sub

Every time you change a cell in the worksheet this would automatically turn back the wrap text property to false. example

Toto
  • 19,304