hide columns macro

  1. S

    VBA code not hiding columns based on cell values

    I have a VBA code the hides columns based on 3 different cell values, but it is not working properly. If cell Z7 & Z33 do not equal "Black" AND if cell Z39 does not equal "Yes" then hide columns K:N. So I want the code to hide columns K:N if Z7 & Z33 <> "Black" and Z39 <> "Yes". Sub...
  2. M

    Hide columns if visible VBA

    Hi I'd like to hide a couple of columns in a sheet, if the columns are visible, without defining additional variables. I also don't want to use the Sheet name - I'd prefer to use the Sheet number that appears in the VBA editor. Let's assume the columns are D and M. And the Sheet is...
  3. J

    VBA column selecting

    I am working on an inventory project and have 2 problems that i cannot find a solution for. 1. The first is i need to select the first empty cell in the first row and fill it with the current date. I have the code for the date working great and the code works fine the first time, but after...
  4. J

    Combining VBA code for different commands

    Hello, I am very new to VBA so this is probably a very easy question. I am trying to hide rows and hide columns using two scripts I have found. I have tested them both on separate tabs and they work. However, when I try to combine them on the same tab, I keep having problems. I don't know if it...
  5. O

    Looping macro with input message box receiving runtime error 91

    I have written vba code to hide columns when a range of cells do not match a specific initial. This piece of the code works. I want to expand the code with a message box to ask for input (Please enter initials?). Once initials entered run the below code based on the initials entered. Then...
  6. R

    Hide columns based on cell value

    Hi, I am struggling to create a macro for hidding columns based on various tabs with a true or false trigger. Below is my code... what am I doing wrong? Probably a quick one for you guys, but tearing my hair out! Also - it is likely I can slim it down, any pointers are very welcomed. Sub...
  7. I

    Filter Columns On A Sheet Based On Filtered Rows On Another Sheet

    Hi All, I'm somewhat a newbie when it comes to macros so please bear with me. I have an excel spreadsheet with two sheets. Sheet 1 has a 100 entries (rows 1 - 100) that are laid horizontally so they are easy to filter. Sheet 2 has the same 100 entries but are laid out vertically (columns A -...

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