How to apply color to a specified cell

Hello,

I want to apply color to a specified excel cell where it matches my criteria as if cell contains “ABCD” then mark as red color else blue color. I am facing issue for getting cell index.
ex: I am taking column B in that for suppose row 8th is having my required “ABCD” value so i should get the B8 index value and mark that in red color.

2 Likes

Hi @mani93

You can read this article for your reference.

cheers :smiley:

Happy learning :smiley:

3 Likes

@pattyricarte
Thank You

1 Like

No Worries @mani93

Happy to help here :smiley:

cheers :smiley:

Happy learning :smiley:

1 Like

Invoke a vbnet code to change the cell color like below
e.g. DataGridView1.Item(columnindex, rowindex).Style.BackColor = Color.Red

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.