How to fill color any cell in excel

4 views (last 30 days)
Hi I got a trouble. I have an excel table that contains even and odd values I want to find odd values and fill color it like the picture.
Thank you very much!

Accepted Answer

Image Analyst
Image Analyst on 16 Dec 2017
Use ActiveX, like in the attached demo.
The line you want to have is:
Excel.Worksheets.Item(1).Range(cellReference).Interior.ColorIndex = cellFillColorIndex;
  1 Comment
Manh Cuong Bui
Manh Cuong Bui on 18 Dec 2017
Thank you very much! can you give me an example that use this statement: Excel.Worksheets.Item(1).Range(cellReference).Interior.ColorIndex = cellFillColorIndex;

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!