VBA Code to AutoFit rows columns and entire worksheet || Excel Tricks

Поділитися
Вставка
  • Опубліковано 3 сер 2024
  • In this tutorial, let us learn about VBA Code to AutoFit rows, columns and entire worksheet in Excel
    This is the sample small data I am considering in this video now.
    💥 DON'T CLICK THIS: ➡️ bit.ly/3sPIZvD
    👉 Link to download the exercise file: ➡️ bit.ly/3AzzZO2
    👀 Best Laptops to use for better speed:
    1️⃣ amzn.to/3lf8zYU
    2️⃣ amzn.to/3xejpAW
    3️⃣ amzn.to/379OqeL
    1. Autofit a Column
    Sub vba_autofit()
    Columns(2).AutoFit
    End Sub
    2. Autofit a Row
    Sub vba_autofit()
    Rows(12).AutoFit
    End Sub
    3. AutoFit a Range
    Sub vba_autofit()
    ActiveSheet.UsedRange.EntireColumn.AutoFit
    ActiveSheet.UsedRange.EntireRow.AutoFit
    End Sub
    4. AutoFit Entire Worksheet
    Sub vba_autofit()
    Worksheets("Sheet1").Cells.EntireColumn.AutoFit
    Worksheets("Sheet1").Cells.EntireRow.AutoFit
    End Sub
    ▶️Best Equipment & Tools for UA-cam Channel : ➡️ bit.ly/3inKa1P
    📒Our Recommendations
    ***************************************************************
    📗Oracle Primavera Tutorials : bit.ly/3fn9PFH
    📗Microsoft Excel Tutorials : bit.ly/2V5de5l
    📗Microsoft Project Tutorials : bit.ly/37guNl7
    For personalized detail learning, write to 📥 info@dptutorials.com
    If you found this video valuable, give it a like. If you know someone who needs to see it, share it. Leave a comment below with your thoughts. Add it to a playlist if you want to watch it later.
    ***********************************************
    ★ My Online Tutorials ► www.dptutorials.com
    ⚡️LEARNING RESOURCES I Recommend: www.dptutorials.com/resources
    ⚡️Subscribe for more Awesome Tutorials: goo.gl/NyAtg2
    ⚡️Support the Channel via shopping: amzn.to/2ZRfTOZ ift.tt/2jH38PR
    ⚡️Tools for UA-cam vlogging:
    ***********************************************
    • Laptop: amzn.to/2UqFu1K
    • Canon 200D Camera: amzn.to/3gcfbUT
    • Benro Tripod: amzn.to/3D0fQ5l
    • Microphone: amzn.to/2XDiOg7
    • Collar Microphone: amzn.to/3miLB3X
    • Screen recorder: techsmith.pxf.io/2BMjA
    • Boom Arm Stand: amzn.to/3gaVDQs
    • Zoom H1 Audio Recorder: amzn.to/3AMpkzg
    • Harison Softbox Studio Lights: amzn.to/2W7ZuXi
    • Chroma Key Green Screen: amzn.to/3gdjCP9
    • Background Support Stand: amzn.to/3m9Ej2l
    • Acoustic Foam Background: amzn.to/3xYv07E
    • USB RGB LED Strip: amzn.to/3g9k4xO
    • Wireless Mouse: amzn.to/2XxqMqV
    ***********************************************
    ⚡️You Can Connect with Me at:
    ***********************************************
    💎UA-cam: / dptutorials
    💎Instagram: / dptutorials
    💎G+: ift.tt/2kAOpa6
    💎Twitter: / dptutorials15
    💎Facebook: ift.tt/2kfRnDi
    💎BlogSpot: ift.tt/2kB14dh
    💎Websites: www.dptutorials.com &
    💎www.askplanner.blogspot.com
    💎Telegram: t.me/dptutorials16
    #dptutorials #autofit #excelautofit #exceltraining #exceltricks #exceltips #excelfreetraining #excelfreelearning
    ⚡️Tags: -
    excel formulas in english, excel in english, excel tutorial in english,ms excel in english,ms excel tutorial in english, learn excel in english,vlookup in excel in english, learn ms excel in english, excel training, excel tutorial, microsoft excel 2007, learn excel,tutorial excel, ms excel tutorial, excel tutorials,ms excel 2007,microsoft excel training,learn excel online,learning excel,free excel training,online excel training,advanced excel tutorial,excel tutorial, excel formulas and functions, excel formulas, excel tutorial in hindi, excel formulas and functions in hindi, excel tricks, excel in hindi, excel shortcut keys, excel vlookup, excel formulas in hindi, excel for beginners, excel for accounting, excel formulas and functions tutorial, excel sum formula, sum formula series, excel attendance sheet, excel salary sheet, excel stock maintain, excel data entry, advanced excel tutorial,excel formulas,excel tutorial,vlookup excel,excel accounting,excel for beginners,excel shortcut keys,excel sum formula,excel training,excel training online,excel tricks,free excel training,learn excel,learn excel online,microsoft excel
    🎁Note: This description contains affiliate links, which means at no additional cost to you, we will receive a small commission if you make a purchase using the links. This helps support the channel and allows us to continue to make videos like this. Thank you for your support!

КОМЕНТАРІ • 5

  • @erolemreekinci1741
    @erolemreekinci1741 6 місяців тому

    Thank you friend,I need it 😊

  • @nisarahmed5869
    @nisarahmed5869 6 місяців тому

    Excellent

  • @SunriseTechno
    @SunriseTechno Рік тому +1

    Thanks Bhai

  • @jeeveshbaliya9061
    @jeeveshbaliya9061 Рік тому

    How can use the same function for merged cells and if we have to wrap text ? Can u show it ?

  • @robd9005
    @robd9005 Рік тому

    thx Bhai, I do not get the code working properly when excel opens an extract from the source data when I double click in a pivot table. then Excel opens a new sheet with details. I try to auto fit this sheet as well, but it does not work. Do you have a solution?
    thx in advance Rob