Conditionally fill color base on cell value in Column A with VBA

primala

New Member
Joined
May 31, 2012
Messages
39
Hi,

I need to apply fill color "green" for the entire row (from column A to G) only if a cell value in column A contains with "111200317" or it might be better if could refer to cell A1 (cell value in A1 is 111200317). How to do it with VBA?

Regards
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Dear Andrew Poulsom,

Thanks so much for your kind assistance. I am working in project closeout, do material reconciliation and in the end validate what's the charges in and out within account 111200317. All of the transactions is noted in a batch number, and for one account (111200317) could have more than 400 batch numbers it means 400 excel files that I have to exercise. From and to which account charges related to.

By the way, I've tried your suggestion with 3 records below :
A1 = 111200317
A3 = 111200317.251000.2341
A4 = 111000239
A5 = 111200317.251000
A6 = 111000239
A7 = 111200317

and the formula in Conditional Formatting is =A$1, and applied to A3:A10 but all fill color turn into Green. Is there any mistake I made?

Thanks in advance
 
Upvote 0
Dear Andrew,

Thanks for your attention and solution. Problem solved. Again, thanks so much.

Regards
 
Upvote 0

Forum statistics

Threads
1,214,521
Messages
6,120,018
Members
448,937
Latest member
BeerMan23

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