ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Cell Formatting (https://www.excelbanter.com/excel-programming/281324-cell-formatting.html)

steve

Cell Formatting
 
Hi

This must be simple but just can't get my head around it.

I have VB code that runs through a number of cells and
checks against the value of another set of cells. What I
would like to do is change the background color of a cell
to yellow if the call matches. I thought I had tried
everything but does not seem to like anything I do.

This is part of the code:

While Not Cells(RwIndex, CoIndex).Value = ""
ChkValue = Cells(RwIndex, CoIndex).Value
Select Case ChkValue
Case Cells(2, 4)
Cells(RwIndex, CoIndex).?????????

I would appreciate your help.

Many Thanks

Steve

Chip Pearson

Cell Formatting
 
Steve,

You can change the background color of the cell to yellow with code like

Cells(RwIndex, CoIndex).Interior.ColorIndex = 3

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

"Steve" wrote in message
...
Hi

This must be simple but just can't get my head around it.

I have VB code that runs through a number of cells and
checks against the value of another set of cells. What I
would like to do is change the background color of a cell
to yellow if the call matches. I thought I had tried
everything but does not seem to like anything I do.

This is part of the code:

While Not Cells(RwIndex, CoIndex).Value = ""
ChkValue = Cells(RwIndex, CoIndex).Value
Select Case ChkValue
Case Cells(2, 4)
Cells(RwIndex, CoIndex).?????????

I would appreciate your help.

Many Thanks

Steve




steve

Cell Formatting
 
Thanks Chip

I'm sure I tried that.

Still, Appreciate you help.

If I wanted my spreadsheet to continuously check and then
Highlight, can this be done?

At the moment I have this code attached to a button so it
is a manual process.

Best Regards

Steve
-----Original Message-----
Steve,

You can change the background color of the cell to

yellow with code like

Cells(RwIndex, CoIndex).Interior.ColorIndex = 3

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

"Steve" wrote in

message
...
Hi

This must be simple but just can't get my head around

it.

I have VB code that runs through a number of cells and
checks against the value of another set of cells. What

I
would like to do is change the background color of a

cell
to yellow if the call matches. I thought I had tried
everything but does not seem to like anything I do.

This is part of the code:

While Not Cells(RwIndex, CoIndex).Value = ""
ChkValue = Cells(RwIndex, CoIndex).Value
Select Case ChkValue
Case Cells(2, 4)
Cells(RwIndex, CoIndex).?????????

I would appreciate your help.

Many Thanks

Steve



.


Chip Pearson

Cell Formatting
 
Steve,

You can use OnTime to schedule a macro to run every N seconds. See
www.cpearson.com/excel/ontime.htm for details and example code.

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Steve" wrote in message
...
Thanks Chip

I'm sure I tried that.

Still, Appreciate you help.

If I wanted my spreadsheet to continuously check and then
Highlight, can this be done?

At the moment I have this code attached to a button so it
is a manual process.

Best Regards

Steve
-----Original Message-----
Steve,

You can change the background color of the cell to

yellow with code like

Cells(RwIndex, CoIndex).Interior.ColorIndex = 3

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

"Steve" wrote in

message
...
Hi

This must be simple but just can't get my head around

it.

I have VB code that runs through a number of cells and
checks against the value of another set of cells. What

I
would like to do is change the background color of a

cell
to yellow if the call matches. I thought I had tried
everything but does not seem to like anything I do.

This is part of the code:

While Not Cells(RwIndex, CoIndex).Value = ""
ChkValue = Cells(RwIndex, CoIndex).Value
Select Case ChkValue
Case Cells(2, 4)
Cells(RwIndex, CoIndex).?????????

I would appreciate your help.

Many Thanks

Steve



.





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

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