Բաց թողնել հիմնական բովանդակությունը

Ինչպե՞ս օգտագործել կոճակը Excel- ում թաքցնելու սյունները ցույց տալու համար:

Այս հոդվածը ձեզ ցույց կտա Excel- ում սյունակները ցույց տալու և թաքցնելու կոճակի ստեղծման և օգտագործման մեթոդները:

Օգտագործեք կոճակը ՝ Toggle կոճակով թաքցնելու սյունները ցույց տալու համար
Օգտագործեք կոճակը Excel- ի համար Kutools- ով թաքցնելու սյունները ցույց տալու համար


Օգտագործեք կոճակը ՝ Toggle կոճակով թաքցնելու սյունները ցույց տալու համար

Թաքցնելու սյունները ցուցադրելու համար կարող եք ստեղծել «Փոխարկել» կոճակը ՝ կտտացնելով այն: Խնդրում եմ արեք հետևյալ կերպ.

1: սեղմեք Երեվակիչ > Տեղադրել > Անջատման կոճակ (ActiveX կառավարման), Տեսեք,

ՆշումԵթե ​​չես տեսնում Երեվակիչ էջանիշը ժապավենի վրա, խնդրում ենք կտտացնել ցույց տալ / ցուցադրել մշակողի ներդիրը Excel- ում իմանալ, թե ինչպես դա հնարավոր է դարձնել:

2. Նկարեք Toggle կոճակը աշխատանքային թերթի վրա: Աջ կտտացրեք այն և ընտրեք Դիտել կոդը աջ կտտացնելու ցանկից: Տեսեք,

3. Բացվածքում Microsoft Visual Basic ծրագրեր պատուհան, ծածկագրի ամբողջ պատուհանում պարունակվող ամբողջ բովանդակությունը փոխարինեք ներքևում նշված VBA կոդով:

VBA կոդ. Կոճակը ՝ թաքցնելու սյունները ցուցադրելու համար

Private Sub ToggleButton1_Click()
Dim xAddress As String
xAddress = "F:G"
If ToggleButton1.Value Then
    Application.ActiveSheet.Columns(xAddress).Hidden = True
Else
    Application.ActiveSheet.Columns(xAddress).Hidden = False
End If
End Sub

ՆշումԿոդում «F: G» նշանակում է, որ F: G սյունակները կցուցադրվեն և կթաքցվեն ծածկագիրը գործարկելիս: Խնդրում ենք փոխել դրանք ձեր կարիքների համար:

4. Մամուլ ալտ + Q ստեղները միաժամանակ փակելու համար Microsoft Visual Basic ծրագրեր պատուհան.

5. Անջատեք Դիզայնի ռեժիմ կտտոցով Երեվակիչ > Դիզայնի ռեժիմ.

Այժմ, երբ կտտացնում եք փոխելու կոճակը, նշված սյուններն անմիջապես թաքցվում են:

Երբ այն կրկին կտտացնում է, սյունակները ցուցադրվում են:


Օգտագործեք կոճակը Excel- ի համար Kutools- ով թաքցնելու սյունները ցույց տալու համար

Եթե ​​ձեր աշխատաթերթում արդեն սյունակներ են թաքնված, Excel- ի համար նախատեսված գործիքներ'S Անջատեք ՝ բոլոր թաքնված սյունակները ցուցադրելու / թաքցնելու համար օգտակար ծրագիրը կարող է օգնել ձեզ արագորեն ցույց տալ և թաքցնել դրանք միայն մեկ հպումով:

Նախքան դիմելը Excel- ի համար նախատեսված գործիքներ, խնդրում եմ նախ ներբեռնեք և տեղադրեք այն.

1: սեղմեք Կուտոլս > Նավարկում

2. Անցնել դեպի Սյունակների ցուցակ պատուհանը, ապա կարող եք սեղմել Անջատեք ՝ բոլոր թաքնված սյունակները ցուցադրելու / թաքցնելու համար ընթացիկ աշխատաթերթում սյունակները ցույց տալու / թաքցնելու կոճակը:

  Եթե ​​ցանկանում եք ունենալ այս օգտակար ծառայության անվճար փորձարկում (30-օրյա), խնդրում ենք կտտացնել այն ներբեռնելու համար, և այնուհետև անցեք գործողությունը կիրառելու վերը նշված քայլերին համապատասխան:


Օգտագործեք կոճակը Excel- ի համար Kutools- ով թաքցնելու սյունները ցույց տալու համար

Գրասենյակի արտադրողականության լավագույն գործիքները

🤖 Kutools AI օգնականՀեղափոխություն կատարել տվյալների վերլուծության հիման վրա՝ Խելացի կատարում   |  Ստեղծեք ծածկագիր  |  Ստեղծեք հատուկ բանաձևեր  |  Վերլուծել տվյալները և ստեղծել գծապատկերներ  |  Invoke Kutools-ի գործառույթները...
Հանրաճանաչ հատկություններ: Գտեք, ընդգծեք կամ նույնականացրեք կրկնօրինակները   |  Deleteնջել դատարկ շարքերը   |  Միավորել սյունակները կամ բջիջները՝ առանց տվյալների կորստի   |   Կլոր առանց բանաձևի ...
Super Փնտրել: Բազմաթիվ չափանիշների VLookup    Բազմակի արժեք VLookup  |   VLookup բազմաթիվ թերթերում   |   Fuzzy Փնտրել ....
Ընդլայնված բացվող ցուցակ: Արագ ստեղծեք բացվող ցուցակը   |  Կախված բացվող ցուցակ   |  Բազմակի ընտրություն Drop Down ցուցակ ....
Սյունակի կառավարիչ: Ավելացրեք որոշակի քանակությամբ սյունակներ  |  Տեղափոխել սյունակները  |  Փոխարկել թաքնված սյունակների տեսանելիության կարգավիճակը  |  Համեմատեք միջակայքերը և սյունակները ...
Առանձնահատկություններ: Ցանցի կենտրոնացում   |  Դիզայնի տեսք   |   Մեծ Formula Bar    Աշխատանքային գրքույկի և թերթիկների կառավարիչ   |  Ռեսուրսների գրադարան (Ավտոմատ տեքստ)   |  Ամսաթիվ ընտրող   |  Միավորել աշխատանքային թերթերը   |  Գաղտնագրել/գաղտնազերծել բջիջները    Ուղարկեք նամակներ ըստ ցանկի   |  Սուպեր զտիչ   |   Հատուկ զտիչ (զտել թավ/շեղ/շեղված...) ...
Լավագույն 15 գործիքների հավաքածու12 Տեքստ Գործիքներ (Ավելացրեք տեքստ, Հեռացնել նիշերը, ...)   |   50+ Աղյուսակ Տեսակներ (Գանտի աղյուսակը, ...)   |   40+ Գործնական Բանաձեւեր (Հաշվարկել տարիքը ՝ ելնելով ծննդյան տարեդարձից, ...)   |   19 միացում Գործիքներ (Տեղադրեք QR կոդ, Տեղադրեք նկար ուղուց, ...)   |   12 Փոխարկում Գործիքներ (Բառեր համարներ, Արտարժույթի փոխակերպումը, ...)   |   7 Միաձուլում և պառակտում Գործիքներ (Ընդլայնված կոմբինատ տողեր, Պառակտված բջիջներ, ...)   |   ... եւ ավելին

Լրացրեք ձեր Excel-ի հմտությունները Kutools-ի հետ Excel-ի համար և փորձեք արդյունավետությունը, ինչպես երբեք: Kutools-ը Excel-ի համար առաջարկում է ավելի քան 300 առաջադեմ առանձնահատկություններ՝ արտադրողականությունը բարձրացնելու և ժամանակ խնայելու համար:  Սեղմեք այստեղ՝ Ձեզ ամենաշատ անհրաժեշտ հատկանիշը ստանալու համար...

Նկարագրություն


Office Tab- ը Tabbed ինտերֆեյսը բերում է Office, և ձեր աշխատանքը շատ ավելի դյուրին դարձրեք

  • Միացնել ներդիրներով խմբագրումը և ընթերցումը Word, Excel, PowerPoint- ով, Հրատարակիչ, Access, Visio և Project:
  • Բացեք և ստեղծեք բազմաթիվ փաստաթղթեր նույն պատուհանի նոր ներդիրներում, այլ ոչ թե նոր պատուհաններում:
  • Բարձրացնում է ձեր արտադրողականությունը 50%-ով և նվազեցնում մկնիկի հարյուրավոր սեղմումները ձեզ համար ամեն օր:
Comments (18)
Rated 5 out of 5 · 1 ratings
This comment was minimized by the moderator on the site
YOU SAVE MY LIFE. THANKS A LOT!
This comment was minimized by the moderator on the site
Hello, I hope you are well.
If you can help me... I'd appreciate it. I would like to include an image in the button, would it be possible to place it directly in this code?
Rated 4 out of 5
This comment was minimized by the moderator on the site
Hi Eliza,

You can add a picture to a Toggle Button using its "Picture" property. Here's how to do it:
Right click the button and select Properties, in the Properties dialog box, go to the Categoried tab, look for the "Picture" property, click the ellipsis (...) next to the "Picture" property to open the file dialog and then you can select the picture you want.
This comment was minimized by the moderator on the site
Hi, Crystal
It doesn't work perfectly as I wanted, I had already tried... But I managed to do it another way. Thanks for the help! :)
Your content is very educational and helps many people, keep it up.
Rated 5 out of 5
This comment was minimized by the moderator on the site
Olá, espero que você esteja bem.
Se conseguir me ajudar.. agradeço. Gostaria de incluir uma imagem no botão, seria possível colocar diretamente nesse código?
This comment was minimized by the moderator on the site
Hi what is the code to hide rows instead of columns
Thanks
This comment was minimized by the moderator on the site
Hi Andy,
This VBA code can help. Please give it a try. Thank you.
You need to change the row number in the xAddress line to the rows you want to hide.
Private Sub ToggleButton1_Click()
'Updated by Extendoffice 20230915
Dim xAddress As String
xAddress = "5:10"
If ToggleButton1.Value Then
    Application.ActiveSheet.Rows(xAddress).Hidden = True
Else
    Application.ActiveSheet.Rows(xAddress).Hidden = False
End If
End Sub
This comment was minimized by the moderator on the site
Bonjour,

Top cela fonctionne bien !!

Cependant dans mon cas de figure je masque plusieurs groupes de colonnes ( ex : un bouton 1 pour masquer les colonnes D:E et un bouton 2 pour masquer les colonnes I:K). Comment faire pour que je puisse masquer un groupe de colonnes de façon indépendante et que je ne sois pas obligé d'activer le bouton 1 afin de pouvoir activer le bouton 2 ?

Je débute merci d'avance :)
This comment was minimized by the moderator on the site
Great written tutorial, but how do I create this button on a shared Excel sheet?
This comment was minimized by the moderator on the site
Hi Madison Taylor Delgado,
Are your workbooks shared on OneDrive or other applications? I am not able to solve this problem yet. Sorry for that.
This comment was minimized by the moderator on the site
Bom dia!

Eu gostaria de ajuda com um código para Control ActiveX onde eu pudesse selecionar colunas intercaladas.

Obrigado
This comment was minimized by the moderator on the site
I tried the formula on 3 buttons. The problem is they hide and unhide according to the sequenced they are inputted in the code. Is there anyway that I can click any button that will show/hide the columns not in sequence?
This comment was minimized by the moderator on the site
Adding to Ryan's comment, how about hiding a column based on the value of a cell? Basically making the xAdress an IF-function and not a predetermined range of columns.
This comment was minimized by the moderator on the site
Dear Liz,

Thank you for your comment!

VBA code in this tutorial can help you hiding specified columns based on the value of a cell. Please follow the below hyperlink to know more details.
https://www.extendoffice.com/documents/excel/2682-excel-hide-columns-based-on-dropdown-list.html
This comment was minimized by the moderator on the site
Hi there, How would you change it to select a bunch of non-adjacent cells?
This comment was minimized by the moderator on the site
Dear Ryan,

If you need to select a bunch of non-adjacent cells (every selected cell is interval of X cell) as below screenshot shown, please try the Select Interval Rows & Columns utility of Kutools for Excel.

You can also follow this link to know more about this feature. Thank you!
https://www.extendoffice.com/product/kutools-for-excel/excel-select-interval-rows-or-columns.html
This comment was minimized by the moderator on the site
Dear Ryan,

About the bunch of non-adjacent cells you need to select, can you provide a screenshot to show where they locating in your worksheet?
Thank you for your comment.
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations