Forum Discussion

FraserLittle's avatar
FraserLittle
Copper Contributor
Aug 12, 2022

Can I get "Wrap Text" to Automatically autofit row height on a cell containing a formula?

Hi there, 

 

Using excel for the web, I have a page that looks up various different sheets (all in the same workbook) based on a unique identifier in cell B4. As an example, a cell contains the following formula "=FILTER(Sheet2!P2:P500,$B$4=Sheet2!$A$2:$A$500)". There are around 10 cells using the Filter formula, a couple using XLookups where VLookup won't work, and most of the other cells use double VLookups.

 

The cell from the above example is displaying from the "Notes" column of Sheet2. Some users enter relatively long notes in this column, some short. I don't want to set the row height to be large by default, and I don't want to increase the column width anymore than I already have, but I do want the full text to be displayed. I would like the wrap text function to expand the row height if required, however formatting the cells with "Auto Fit Row Height" doesn't do anything. 

 

A similar question was asked 2 years ago, the response was to use VBA to adjust (not an option for me on excel for the web). The lookups happen instantly when cell B4 is changed, but the row heights don't budge when they need to. I don't want to force users to manually adjust and re-adjust, or to run a script to adjust and re-adjust repeatedly, the point of this document is to save the user time.

 

Thank you for your help. 

 

Kind Regards,

Fraser Little

2 Replies

  • SergeiBaklan's avatar
    SergeiBaklan
    Diamond Contributor

    FraserLittle 

    Formulae return the value, not cell properties like colour or wrap text. To play with latest that's VBA or Office Scripts, depends on version/platform.

    • FraserLittle's avatar
      FraserLittle
      Copper Contributor

      Hi SergeiBaklan 

       

      Thank you for your response. 

       

      The problem is the formula could return a one word answer, or could return a paragraph. How can I make the cell adjust height automatically to fit the text displayed so the full text is visible to the user?

       

      Thank you. 


      Kind Regards,

      Fraser Little

Resources