Conditional Formating in VBA

SkyeS

New Member
Joined
May 21, 2015
Messages
40
I've been doing a lot of research but I still can't quite figure out how to do this, so any help would be great. I posted this earlier, but after another question until I realized I needed to use VBA formatting to do it.

I want to format the Cell of "Dog" when those two rows are filled with Yes for each cell. The "Yes" and "No"s in those two rows and five colns are associated with "Dog". And then I also want the same for "Cat" when those three rows and 5 colns are filled with Yes. But I will be adding more "projects" to the spread sheet so I don't want to have to create a new conditional formatting each time for each project and the rows and colns that go with it. Each project will change the number of rows of Yes/Nos that it will have. So a project called "Bird" might be inserted that contains 7 rows and 5 colns and then another project called "Lizard" might be inserted with 2 rows and 5 colns. It will always have 5 colns though. When the project is inserted, it will always be inserted at the top of the spreadsheet. Right below the headings and right before the next project. There is always an empty row between projects. Does that make more sense?

I have a macro right now that pulls up a userform and the information is then pasted into the cells in the spreadsheet. I'm assuming I need to add code to that macro to format the cells I want to contain the condition formatting, I'm just not sure how to do that.

Thank you in advance!
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Forum statistics

Threads
1,215,046
Messages
6,122,855
Members
449,096
Latest member
Erald

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