VBA to hide rows and apply cell colors based on multiple columns' values

doconnor

New Member
Joined
Jun 15, 2022
Messages
1
Office Version
  1. 2016
Platform
  1. Windows
Hi! I'm trying to apply some conditional formatting to an Excel worksheet with a macro (using VBA). Below are the conditions and subsequent actions I'm looking to execute:

First:

hide all rows (in the entire active sheet) if the value of the cell in Column G ="BID", AND if the value of the cell in Column H <10000.00, AND if the value of the cell in Column I ="Orders, Web" OR ="cXML Orders"

Second:

hide all rows (in the entire active sheet) if the value of the cell in Column G ="MO", AND if the value of the cell in Column H <10000.00

Then, as another separate macro to run after the above two are run:

Apply RBG(253, 233, 217) color to any/all cells in Column G if the value of the cell in Column G is <10000.00

If you could provide some direction on this, I would be so grateful!
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

Forum statistics

Threads
1,224,820
Messages
6,181,162
Members
453,021
Latest member
Justyna P

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