How To Turn A Row One Of Two Colours Without CF

  • Thread starter Thread starter Minitman
  • Start date Start date
M

Minitman

Greetings.

Is there a way to turn a part of a row (A:W) one of two colors,
without using Conditional Formatting (already used all three
conditions), when I paste into that row from a UserForm? I will need
to be able to copy the procedure into 120 sheets (CF Plus won't do
that)

Any help would be appreciated/

TIA

-Minitman
 
You do not specify how you are pasting the row from your UserForm or the
conditions you want to test so I can only give a general response: use your
code to test the conditions, and then after the paste set the cells' interior
color. The location where you are pasting and all your cell values that you
may need to include in the test conditions should all either be variables or
object properties that you can read through your code - something in the form
of:
If Range("C" & PasteRowNo).Value <= MyVariable1 Then
Range("A" & PasteRowNo & ":W" & PasteRowNo).Cells.Interior.Color = Color1
Else
Range("A" & PasteRowNo & ":W" & PasteRowNo).Cells.Interior.Color = Color2
End If

This technique does not erase your conditional formatting in those cells, so
if you have set up the conditional formatting on these cells it will still
apply; the colors set above will be the default colors if none of the CF
conditions are met.
 
Back
Top