Forum Discussion
Excel
Aug 26, 2021Iron Contributor
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...
- Aug 26, 2021
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.
Excel
Aug 26, 2021Iron Contributor
Sir, if we highlight only SPACE column, then what should i write in VBA?
HansVogelaar
Aug 26, 2021MVP
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.
- ExcelAug 26, 2021Iron Contributor