Forum Discussion

Excel's avatar
Excel
Iron Contributor
Aug 26, 2021
Solved

Question related highlight cell with the help of VBA code

Hello Everyone, I want to highlight cells(Red colour) which is more than 4 in SPACE COLUMN with the help of VBA code. So, what should i write in VBA code?   Please help..??   Here is a attached...
  • HansVogelaar's avatar
    HansVogelaar
    Aug 26, 2021

    Excel 

    Change the line

                Range("A" & r).Resize(1, 4).Interior.Color = vbRed

    to

                Range("D" & r).Interior.Color = vbRed

    Remark: if you want to learn to write VBA, you should really try to make such changes yourself. Even if you make mistakes, you will learn much more from experimenting than from asking us for every small detail.

     

Resources