ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Help Please (https://www.excelbanter.com/excel-programming/395848-help-please.html)

kiran

Help Please
 
Hi All,
I have developed an application using Visual Basic & Access. My query is i
am getting the report from access database to excel while exporting data from
access to excel i want all the cell with NO to be filled with red color this
can be done by conditional formatting but i want this to be automated as soon
this is extracted from access database.

TIA

Bob Phillips

Help Please
 
You can add the CF in the code that gets the data

Dim rng As Range


Set rng = Range("A:B") '<=== change to suit
rng.FormatConditions.Delete
rng.FormatConditions.Add Type:=xlExpression, Formula1:="=RC=""Yes"""
rng.FormatConditions(1).Interior.ColorIndex = 3
Set rng = Nothing


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"kiran" wrote in message
...
Hi All,
I have developed an application using Visual Basic & Access. My query is i
am getting the report from access database to excel while exporting data
from
access to excel i want all the cell with NO to be filled with red color
this
can be done by conditional formatting but i want this to be automated as
soon
this is extracted from access database.

TIA





All times are GMT +1. The time now is 05:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com