Macro to Hide Certain Rows with the Click of a Button, and other Rows with the Click of Another Button?

duusomething

New Member
Joined
Jul 2, 2014
Messages
2
Hello,

I have a spreadsheet that is broken into costs for Canada and for the US. I don't know much about Macros, but am hoping to use a macro to hide all the rows that relate to an American cost when you click a button that might say "Canada" for example. And I'm hoping to have another button that you can click which will hide all the rows for the Canadian costs when you click a button that might say "US". I'm hoping to do this so that when people look at the tab they can see the costs for both countries, the cost just for Canada or the cost just for US.

The Canadian data is in rows: 8-27, 48-59 and 74-87
The American data is in rows: 29-46, 61-72, and 89-102

I'm using Windows 7, with excel 2010.

Thanks in advance
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

Forum statistics

Threads
1,223,276
Messages
6,171,138
Members
452,381
Latest member
Nova88

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