0

I created an excel application where the users enter the comments for every question.

I have designed the excel spreadsheet in such a way that, I have merged cells to capture large text data. The problem I have been coming across is when the comments exceeds more than three lines and when I need to print the excel file, it crops the cell content.

enter image description here

How do I dynamically increase the cell size when the text entered is big enough. ?

Private Sub Workbook_Open()

   Application.ScreenUpdating = False
   Application.DisplayAlerts = False
   ThisWorkbook.Sheets("Sheet1").Activate

   Application.PrintCommunication = False
    With Sheets("Sheet1").PageSetup
      .Zoom = False
      .FitToPagesWide = 1
      .FitToPagesTall = False
    End With
  Application.PrintCommunication = True
  Application.ScreenUpdating = True
  Application.DisplayAlerts = True

End Sub
4
  • Do you mean merged cells or something else (" two columns have been wrapped"). Is there anything at all in the cell(s) to the right of the comment cells? Do you have the cell format set to wrap? Have you set up a print area?
    – bvaughn
    Jul 27, 2016 at 15:35
  • There is nothing to the right. I have the warpped the content of the cells too and set up the print area as well.
    – Swathi
    Jul 27, 2016 at 15:41
  • if you start typing in one of the wrapped cells, does the cell size automatically expand?
    – bvaughn
    Jul 29, 2016 at 20:40
  • Unfortunately there is no way for that in Excel. It doesn't consider merged cells foie autofit. If you can't avoid found that then you may estimate text length based on number of characters, but that won't always be correct. Jul 30, 2016 at 12:44

0

You must log in to answer this question.

Browse other questions tagged .