View Full Version : excel vba change cell color based on a number value in a range
bjason
03-08-2018, 09:36 AM
I need to change the cell color, in a range, to red if the cell contains a negative integer. I am relatively new to VBA. I have bee trying an if then function but I have been unsuccessful.
PseudoCode, Needs Expansion
Dim Cel As Range
For Ech Cel in SpecifiedRange
If Cel < 0 Then Cel.Interior.ColorIndex = 3
Next
bjason
03-08-2018, 10:27 AM
Thank you for your help SamT. That worked perfectly
You're Welcome
Thanks for the Thanks. Makes my day :cloud9:
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.