Excel Tips - Autofit Row Height to Cell Contents | Auto Text Wrap | Easy Method

Поделиться
HTML-код
  • Опубликовано: 11 сен 2024

Комментарии • 69

  • @remorrey
    @remorrey 9 месяцев назад +7

    A great tip. First time I've added code. Thank you

  • @nakulgoyal3630
    @nakulgoyal3630 3 месяца назад +2

    I was searching this video for quite a few days. It works. Thanks 👍

  • @finlayjoseph
    @finlayjoseph 5 месяцев назад +3

    Wow - thanks - really easy to follow and it works. Many thanks, much appreciated

  • @yamenymooon4076
    @yamenymooon4076 3 месяца назад +1

    I was searching this video for quite a few days. It works. Thanks

  • @youngwill8820
    @youngwill8820 21 день назад +1

    Great tip and thank you saved a lot of work

  • @mishkabehardien3208
    @mishkabehardien3208 2 месяца назад +1

    Thank you! This saved me sooo much time

  • @edchizu2346
    @edchizu2346 10 месяцев назад +13

    I noticed that this does not work if the rows are merged

  • @davidn.2555
    @davidn.2555 7 месяцев назад +1

    Thank you! I just subbed and turned on notifications. Everyone else was yapping on RUclips but you have the solution!

  • @smiththomas64
    @smiththomas64 9 месяцев назад +1

    This worked great. Thank you!

  • @imranbinamdammoe6854
    @imranbinamdammoe6854 23 дня назад +2

    Cells.WrapText=True
    Cell.EntireRow.Autofit

  • @DawnBringerLOL
    @DawnBringerLOL 6 дней назад +1

    thanks bro!

  • @shahnawazabbasi6911
    @shahnawazabbasi6911 2 месяца назад +1

    it works. thanks.

  • @totisause
    @totisause 5 месяцев назад +1

    Thank you! Is there a way to apply this only to a certain range?

    • @CareerSolutionsforToday
      @CareerSolutionsforToday  5 месяцев назад +1

      Thank you so much for the comment. You can apply this to just a certain range by changing the code a bit. For example, if I want the VBA to only apply to cells A1:B100 you could use the code below:
      Set Rng = Range("A1:B100")
      Rng.Cells.WrapText = True
      Rng.EntireRow.AutoFit
      Let me know if this helps =)

    • @totisause
      @totisause 5 месяцев назад +1

      @@CareerSolutionsforToday Perfect! Thanks!

    • @CareerSolutionsforToday
      @CareerSolutionsforToday  5 месяцев назад

      @@totisause Thank you as well, have a great Sunday =)

  • @algot34
    @algot34 6 месяцев назад

    How can I make the text inside the squares be aligned to the top as well? Right now they all align to the bottom. Edit: you type in: Cells.VerticalAlignment = xlTop

  • @FarahNabilah-t5k
    @FarahNabilah-t5k 28 дней назад

    Hey may I know, is it possible to do this if I already have other VBA code in the sheet?

    • @CareerSolutionsforToday
      @CareerSolutionsforToday  27 дней назад

      Hey there, you can sure, as long as the other VBA code doesn't conflict with this code in any way it should still work. Let me know if this helps =)

  • @wsjeefo07
    @wsjeefo07 2 месяца назад

    I took time to read the comments and I must commend you for engaging all the comments with a response. Thank you.
    However I will like to reiterate "the problem with Copy paste data from one cell to another)
    Have you found the solution?

    • @CareerSolutionsforToday
      @CareerSolutionsforToday  2 месяца назад

      Hey there, sorry for my delay. Still haven't found the reason or workaround for this. I will let you know if I uncover anything. I hope you have a great weekend =)

  • @rahuldass452
    @rahuldass452 Месяц назад

    How would you do this on Excel in sharepoint? There isn't a "view code" option when right clicking the tab.

    • @CareerSolutionsforToday
      @CareerSolutionsforToday  Месяц назад

      Hey there and thank you for the comment. So you cannot create or edit macros in Excel online but you can create macros in the app version and then transfer them.

  • @cottagekeeper
    @cottagekeeper 8 месяцев назад

    Any thoughts on how to accomplish this with two merged cells and only apply it to a row with specific text? My example is at the bottom of my invoice I have Terms of Service: in order for my terms of service to fit I have merged to columns in that row. I will add and delete rows above the terms of service as I add products or delete products from my invoice. I also adjust the terms of service based on each client. It is a royal pain to manually adjust the terms of service row each time I create an invoice. Would love to know your thoughts.

    • @CareerSolutionsforToday
      @CareerSolutionsforToday  8 месяцев назад

      Let me research and get back to you =)

    • @cottagekeeper
      @cottagekeeper 8 месяцев назад

      @@CareerSolutionsforToday I kind of found a work around by selecting the rows and columns for the size I need the text box to be, then format cells all the selected cells, under Alignment set as Left (Indent) for Horizontal and Vertical Alignment set as Center. Text Control check the boxes for Wrap Text and Merge Cells. I still have to double click between the row numbers of the first merged row but it does fit the text very well. If I have to add more text I find that adding a row in the middle of my merged rows helps to keep the text looking nicely. Not perfect but it is a work-around. Would love to know if you find something that does autofit. Thanks!

  • @rafaelcano5593
    @rafaelcano5593 7 месяцев назад

    thanks for the video, my issue is after I autofit and closed excel if I come back its not organized. I want to open the excel file and have it already locked so i dont have to autofit everytime i open the file, can you tell me how to do that. Thank you

    • @CareerSolutionsforToday
      @CareerSolutionsforToday  7 месяцев назад

      Hey there, so is it that you want the code to run only when you select it?

  • @K_p_k7000
    @K_p_k7000 6 месяцев назад +1

    Windows 11 doesnt have view code pls explain

    • @CareerSolutionsforToday
      @CareerSolutionsforToday  6 месяцев назад +1

      Hey there, the view code shows up when you right click the tab you are on in Excel, not in windows 11. Let me know if this helps.

  • @pauljohnson8921
    @pauljohnson8921 2 месяца назад

    When I right clock the sheet. View code is not an option

    • @CareerSolutionsforToday
      @CareerSolutionsforToday  2 месяца назад

      @@pauljohnson8921 Are you using the application version of Excel or the web version?

  • @AshishMore-mv2fq
    @AshishMore-mv2fq 7 месяцев назад

    Once we added this code, we can not copy paste data from one cell to another. Please help.

    • @CareerSolutionsforToday
      @CareerSolutionsforToday  7 месяцев назад

      Hello, you are correct that seems to be a limitation. I will work on seeing if there is any workaround and let you know =)

    • @algot34
      @algot34 6 месяцев назад

      You can still copy-paste if you use the web-version (not the app version)

  • @justin3132
    @justin3132 9 месяцев назад

    Is there a way to turn this OFF? It personally drives me insane when dealing with a QBO report or bank feed where transactions tend to have a really long memo and excel taking it upon itself to adjust the row height to display the memo. I literally never want this to happen, and if I do find myself wanting it to happen, I'll adjust for that case. But default, I want Excel to never ever change my row height unless I tell it to.

    • @CareerSolutionsforToday
      @CareerSolutionsforToday  9 месяцев назад

      Hey there. so one way to stop this would be to manually adjust the row heights even once. If you click the number 1 and use Ctrl + Shift + Down to get to the bottom, you can extend the rows to a certain height (even the same as before by changing it back). Doing this will lock the row height until you change it. Let me know if this helps =)

    • @justin3132
      @justin3132 9 месяцев назад

      @@CareerSolutionsforToday Thanks for the reply! So basically any worksheet I'm ever in, I need to preemptively set the row height so that Excel never auto adjusts?

    • @CareerSolutionsforToday
      @CareerSolutionsforToday  9 месяцев назад

      @@justin3132 That would be a way yes, from what I can see if you are using text wrap, Excel will always force the rows to increase unless you change the size manually. A bit of a pain, but the quick adjustment will keep them from expanding. Hopefully the tip I shared helps for doing them all at once too.

    • @vishwajithv
      @vishwajithv 8 месяцев назад

      @@CareerSolutionsforToday Auto height adjustment for excel option was something we exposed earlier. Hence its a painfull when its not happening now

  • @portiazwicker3986
    @portiazwicker3986 2 месяца назад

    This isn't working for me. In fact, if I do Cell Styles > AutoFit Row Height, the cell adjusts and then REVERTS to the way it was. Help!

    • @CareerSolutionsforToday
      @CareerSolutionsforToday  2 месяца назад

      Hey there, I am sorry to hear that. Not sure why that would be happening. What happens when you try the VBA solution?

    • @portiazwicker3986
      @portiazwicker3986 2 месяца назад

      @@CareerSolutionsforToday Unfortunately, nothing happens. The autofit reverts as soon as I leave the cell.

  • @bobjabarbon3813
    @bobjabarbon3813 9 месяцев назад

    Does this work for merged cells?

    • @CareerSolutionsforToday
      @CareerSolutionsforToday  9 месяцев назад

      Hey there, from what I read it will not. I have to reaearch how to adjust for merged cells.

  • @frenchc0nnectiion
    @frenchc0nnectiion 18 дней назад

    I get this error: Variable uses an Automation type not supported in Visual Basic

    • @CareerSolutionsforToday
      @CareerSolutionsforToday  17 дней назад

      Can you copy and paste the specific code you used here so I can see it?

    • @frenchc0nnectiion
      @frenchc0nnectiion 17 дней назад

      @@CareerSolutionsforToday I didn't post any code, When I try to go from General to Worksheet, that is what I get

  • @vishwajithv
    @vishwajithv 8 месяцев назад

    It dint help my problem.

    • @CareerSolutionsforToday
      @CareerSolutionsforToday  8 месяцев назад

      Hey there, you had the question about merged cells correct? I am looking into this and will try to get back to you. I have tested some VBA options but cannot get them to work just yet.

  • @jiramio6823
    @jiramio6823 4 месяца назад

    Not working. Not at all

    • @CareerSolutionsforToday
      @CareerSolutionsforToday  4 месяца назад

      Sorry to hear that. Let me know if there is a part of the video you are maybe having trouble with. I have tested this many times to make sure it works. Maybe a step is missing?
      Let me know and hope you have a great day.