Excel automatically hiding certain columns

TanyaD

New Member
Joined
Feb 15, 2018
Messages
17
Hi,

Hoping you can help me. I am completely new to VBA but definitely willing to give it a try and I suspect it may be the only option to do what I need.

I have a large detailed calendar schedule for seven staff (each day has a column for each staff member). I'm hoping I can include a button for each staff member so when I press that button it only shows the columns for that staff member.

I'm guessing that to only show for staff1 the code would say something along the lines of if row 2 (the row that staff names are in) is "staff2" or "staff3" or "staff4" or "staff5" or "staff6" or "staff7" then hide. Which would then only leave Staff1's columns showing?

Greatly appreciate any help on this.

Cheers,

Tanya
 
Hi again!

The spreadsheet has been working brilliantly, until someone else tried to use it on a Mac :( On the Mac when putting any staff & date combos in it will only show the first column for some reason. Is there anyway to make the code work on both Mac and PC?

Thanks,

Tanya :)
 
Upvote 0

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
I'm afraid that as I don't have a Mac, I have no idea.
 
Upvote 0
No worries, I might start a new thread and see if there's any thoughts out there re Mac, thanks again for all your help :)
 
Upvote 0

Forum statistics

Threads
1,216,181
Messages
6,129,355
Members
449,506
Latest member
nomvula

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