Home

auto row height adjust when doing wrap text

%3CLINGO-SUB%20id%3D%22lingo-sub-751559%22%20slang%3D%22en-US%22%3Eauto%20row%20height%20adjust%20when%20doing%20wrap%20text%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-751559%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Team%2C%3C%2FP%3E%3CP%3EThanks%20for%20looking%20into%20it.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20I%20do%20wrap%20text%20in%20few%20cells%20the%20row%20height%20doesn't%20auto%20change%20to%20show%20all%20text%20content%20in%20the%20cells.%3C%2FP%3E%3CP%3EPlease%20guide%2C%20Thanks%3C%2FP%3E%3CP%3EI%20am%20using%20Office%20365%2C%20WIN10%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-751559%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-751707%22%20slang%3D%22en-US%22%3ERe%3A%20auto%20row%20height%20adjust%20when%20doing%20wrap%20text%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-751707%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F375173%22%20target%3D%22_blank%22%3E%40ShrinivasIyer%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%2C%20you%20can%20adjust%20the%20height%20using%20formatting.%20A%20little%20guide%20below%2C%20this%20may%20help.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%3E%3CA%20href%3D%22https%3A%2F%2Fsupport.office.com%2Fen-us%2Farticle%2Fwrap-text-in-a-cell-2a18cff5-ccc1-4bce-95e4-f0d4f3ff4e84%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsupport.office.com%2Fen-us%2Farticle%2Fwrap-text-in-a-cell-2a18cff5-ccc1-4bce-95e4-f0d4f3ff4e84%3C%2FA%3E%3C%2FFONT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-754139%22%20slang%3D%22en-US%22%3ERe%3A%20auto%20row%20height%20adjust%20when%20doing%20wrap%20text%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-754139%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F374082%22%20target%3D%22_blank%22%3E%40tweetiepie1983%3C%2FA%3E%26nbsp%3BThanks%20for%20your%20reply%20but%20I%20have%20already%20tried%20this%20option.%20This%20doesn't%20work%20hence%20I%20posted%20my%20issue%20here.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-754178%22%20slang%3D%22en-US%22%3ERe%3A%20auto%20row%20height%20adjust%20when%20doing%20wrap%20text%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-754178%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F375173%22%20target%3D%22_blank%22%3E%40ShrinivasIyer%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20some%20cases%20a%20formatting%20coercion%20needs%20a%20nudge%2C%20depending%20on%20the%20data%20and%20its%20formatting%20such%20as%20merged%20cells%20or%20some%20other%20factor%20you%20are%20unaware%20of.%20This%20might%20or%20might%20not%20be%20one%20of%20those%20cases%2C%20but%20to%20make%20sure%2C%20try%20this%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFirst%2C%20if%20this%20is%20not%20a%20macro%20enabled%20workbook%20(with%20the%20.xlsm%20extension)%2C%20please%20save%20the%20workbook%20as%20that%20workbook%20type.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENext%2C%20for%20the%20worksheet%20where%20you%20want%20this%20behavior%20to%20be%20applied%2C%20right-click%20the%20sheet%20tab%2C%20left%20click%20onto%20View%20Code%2C%20and%20paste%20the%20below%20code%20into%20the%20large%20white%20area%20that%20is%20the%20worksheet%20module.%20Then%20press%20Alt%2BQ%20to%20return%20to%20the%20worksheet%20and%20test%20the%20code%20by%20entering%20some%20lengthy%20string%20of%20words%20whose%20length%20would%20exceed%20the%20width%20of%20the%20target%20column.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPersonally%2C%20I%20don't%20think%20VBA%20should%20be%20the%20solution%20to%20what%20you%20are%20experiencing%2C%20but%20this%20is%20a%20starting%20point%2C%20as%20a%20troubleshooting%20tactic%20more%20than%20anything%2C%20to%20at%20least%20make%20sure%20that%20what%20you%20are%20entering%20can%20be%20presented%20in%20a%20row%20whose%20height%20is%20what%20you%20would%20expect.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3EPrivate%20Sub%20Worksheet_Change(ByVal%20Target%20As%20Range)%0AApplication.ScreenUpdating%20%3D%20False%0AWith%20Target%0A.VerticalAlignment%20%3D%20xlCenter%0A.WrapText%20%3D%20True%0ARows(.Row).AutoFit%0AEnd%20With%0AApplication.ScreenUpdating%20%3D%20True%0AEnd%20Sub%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-756086%22%20slang%3D%22en-US%22%3ERe%3A%20auto%20row%20height%20adjust%20when%20doing%20wrap%20text%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-756086%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F24573%22%20target%3D%22_blank%22%3E%40Thomas%20Urtis%3C%2FA%3E%26nbsp%3BThanks%20Thomas.%3C%2FP%3E%3CP%3EI%20entered%20the%20worksheet%20change%20event%20macros%20and%20tried%20again%20but%20it%20didnt%20work.%3C%2FP%3E%3CP%3EEven%20if%20the%20macros%20had%20worked%20it%20would%20be%20a%20temporary%20solution.%20I%20have%20faced%20this%20issue%20many%20times%20in%20past%20few%20years.%20Not%20sure%20why%20MS%20is%20unable%20to%20solve%20it%20yet.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-756137%22%20slang%3D%22en-US%22%3ERe%3A%20auto%20row%20height%20adjust%20when%20doing%20wrap%20text%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-756137%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F375173%22%20target%3D%22_blank%22%3E%40ShrinivasIyer%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENormally%20column%20height%20auto%20change%20does%20not%20happen%20if%20you%20change%20column%20height%20manually%20by%20dragging%20the%20height.%26nbsp%3B%20As%20a%20work%20around%20%2C%20you%20can%20copy%20a%20row%20that%20behaves%20correctly%20and%20format%20paint%20on%20the%20row%20where%20you%20need%20auto%20change%20to%20happen.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENot%20a%20perfect%20solution%2C%20but%20it%20works%20for%20me.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
ShrinivasIyer
New Contributor

Hi Team,

Thanks for looking into it.

 

When I do wrap text in few cells the row height doesn't auto change to show all text content in the cells.

Please guide, Thanks

I am using Office 365, WIN10

 

 

5 Replies

@ShrinivasIyer 

 

Hi, you can adjust the height using formatting. A little guide below, this may help.

 

https://support.office.com/en-us/article/wrap-text-in-a-cell-2a18cff5-ccc1-4bce-95e4-f0d4f3ff4e84

@tweetiepie1983 Thanks for your reply but I have already tried this option. This doesn't work hence I posted my issue here.

@ShrinivasIyer 

In some cases a formatting coercion needs a nudge, depending on the data and its formatting such as merged cells or some other factor you are unaware of. This might or might not be one of those cases, but to make sure, try this:

 

First, if this is not a macro enabled workbook (with the .xlsm extension), please save the workbook as that workbook type.

 

Next, for the worksheet where you want this behavior to be applied, right-click the sheet tab, left click onto View Code, and paste the below code into the large white area that is the worksheet module. Then press Alt+Q to return to the worksheet and test the code by entering some lengthy string of words whose length would exceed the width of the target column.

 

Personally, I don't think VBA should be the solution to what you are experiencing, but this is a starting point, as a troubleshooting tactic more than anything, to at least make sure that what you are entering can be presented in a row whose height is what you would expect.

 

Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
With Target
.VerticalAlignment = xlCenter
.WrapText = True
Rows(.Row).AutoFit
End With
Application.ScreenUpdating = True
End Sub

@Thomas Urtis Thanks Thomas.

I entered the worksheet change event macros and tried again but it didnt work.

Even if the macros had worked it would be a temporary solution. I have faced this issue many times in past few years. Not sure why MS is unable to solve it yet.

@ShrinivasIyer 

Normally column height auto change does not happen if you change column height manually by dragging the height.  As a work around , you can copy a row that behaves correctly and format paint on the row where you need auto change to happen. 

 

Not a perfect solution, but it works for me. 

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
36 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
9 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies