hide / unhide columns

  1. David Kemp

    Hide different columns depending on value in a cell

    Hi everyone, I haven’t used excel in many years, so am more than a bit rusty. I have the following code to hide Column P if cell A1 contains the value “Text 1”. I am trying to add additional arguments so if A1 equals “Text 2”, it will hide Column T or if A1 equals “Text 3” it will hide Column C...
  2. X

    Auto hide columns

    Hello, I have an excel file. I want to automatically hide the corresponding columns during opening. How can this be done? P.S. With the help of Python, I automatically open Excel and take a picture. When opening, I want it to be hidden if cell = 0, or visible if cell = 1.
  3. C

    Hide columns in excel based on column header name

    Hi currently, i want to hide column in my excel based on their column header. This is the code i came out but it keep hit error at line Cells(1,col).entirecolumn.hidden . It hit error hidden method of range class failed Dim col as long, lastcol as long , header as string lastcol =...
  4. J

    Macro to hide columns based off List value in a cell

    Hello everyone - I did find a thread that I think is close to what I'm looking for - but I'm having trouble translating it to look beyond one row's worth of conditionals. Basically I have a list of properties in the columns for a full set of product categories, and based off a selection in a...
  5. C

    Hide columns based on cell value

    I have much the same question as but can't get the answers to work Columns J1-N1 have headers 1 2 3 4 5 I want to hide columns based on S1, which takes values 1-5 If S1 = 1 Hide columns headed 2-5 i.e. K:N If S1 = 2 Hide columns headed 3-5 i.e.L:N If S1 = 3 Hide columns headed 4-5 i.e.M:N If S1...
  6. V

    VBA to send email consisting of all visible cells (& not hidden ones)

    Dear Forum, I have this code in Excel VBA: Sub Outlook_Mail_Every_Worksheet_Body() Dim OutApp As Object Dim OutMail As Object Dim ws As Worksheet With Application .EnableEvents = False .ScreenUpdating = False End With Set OutApp =...
  7. S

    toggle button to hide columns

    i have this toggle button code that hides and unhides for me column E and D but now i want to also hide column P at the same time with them but without hididing the columns between them i just want to hide E,D,P i use this code but i’m writing this on my phone but just to get an idea private...
  8. D

    Hide columns that have whole rows TRUE

    Hello all, I have some table build up from different formulas and so on. Final result is some huge sheet filled with columns and lots of rows showing just True or False. I'd like to know how i could hide all columns that are all their values True, so i can just end up with just the False...
  9. G

    VBA Code for Hiding Column on Sheet Based on Cell Value

    I am BRAND NEW to VBA coding and have tried to figure out how to write what should be a simple code with zero success. I'd like to attach the workbook, but I don't have privileges in this forum. Summary of goal: I have one tab called "Instructions TM1" and another tab called "Ops and ADS...
  10. J

    Adding Borders Depending on Value

    Hey, I've been having issues trying to set this up so was hoping someone could let me know how badly I'm messing up.   I have on sheet one, B15, a drop box that shows from: - "Single" - "Multi x2" - "Multi x3" etc until x10   and on another sheet, information that fills in the C column if x2 is...
  11. J

    VBA used to hide multiple columns works first few times but then it doesn't

    Long story short, I have specific columns on the right side of my worksheet that will 'show' or 'hide' depending on input from the left side of the worksheet. If it was just me, I would do this manually and not bat an eye, but I give this worksheet to a bunch of people who think the only way to...
  12. C

    Help solving VBA code to hide and unhide columns?

    Good day guys & Happy New Year! I have an excel sheet with little bit of VBA code from it to hide and unhide columns https://drive.google.com/open?id=1phpOXBmhJ35_ptgYHCQPhkRkft2APTtl. The sheet works properly but when I added another column some days of the month was hidden too. Like for...
  13. S

    Excel VBA to hide columns based on cell value

    I have 3 tabs within my workbook that I would like to hide columns based on cell value. The following code hides some of the columns, but I am looking for assistance to add the rest of the columns. Here is what I am looking for: Hide Columns J:M if cell K18 is "" Hide Columns N:Q if cell O18...
  14. T

    How to hide and unhide columns based off of a numeric cell value using VBA

    Hey guys, This is my first time posting, but I've definitely used the forums for help before. I need to expand and collapse columns based off of the numerical value in cell A1. And I need to use VBA to do so. Columns B:Z will expand and collapse. For ex. A1 = 0 then no columns show. A1=10 then...
  15. N

    Macro to hide/unhide columns in multiple worksheets and protect/hide on close

    Hello I have limited knowledge with macros so would appreciate any advice you can give me. I have a Workbook that has several users - most only need to view the Workbook, others need to edit certain columns. I would the columns that need to be edited hidden on opening and only visible once...
  16. H

    Hide/unhide empty rows and columns with VBA

    In my Worksheet2, the data are generated based on formulas that reference to data in Worksheet1, and are formatted as a list (from A1 to AS100) like below: <tbody> A B C D E F ... AS 1 ID Code Property1 Property2 Property3 Property4 ... Property28 2 1 AAA 111 3 4 3 CCC...
  17. B

    Macro For Hiding Column

    Thanks for looking at my post. I have the code below for hiding a column in my workbook. I was wanting to see if the code could be made so it would hide column A on any sheet. I have 21 sheets in the workbook Sub Hide_Column() ActiveSheet.Unprotect If...
  18. V

    Keyword search - Highlight Results - Hide other rows

    Dear Excel Experts I adapted a conditional formatting Macro for my purposes. It works now with an inputbox quite neatly and highlights the cells where the keyword is found. However, I want to hide the other rows where the keyword isn't in. I don't know if that's even possible with this code...
  19. J

    .Find using Ranges to Hide/Unhide Columns

    So I'm missing something simple but I just can't see it. I'm using .Find to search cells in a range("J6:BFA6") dim'd as "Name" for a user entered word from range("E5") dim'd as "NameS". If the value isn't found, the column becomes hidden, if it's found the column unhides. It hides the columns...
  20. A

    VBA to automatically unhide columns based on a specific dropdown selection

    Hello! I am in need of a VBA that automatically runs if a user on my worksheet chooses a specific dropdown value. I would like Columns X and Y to automatically become visible only if a color code "Black" is selected from the dropdown in Column W. With all other values (Green, Blue, Purple...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top