MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Specifying conditional formatting for the entire row

  Asked By: Adelisa    Date: Feb 14    Category: MS Office    Views: 971

We can specify conditional formatting in cells C1, C2, C3, ... C65536
=if(B65536>100,1,0), respectively.

I wonder if there is a better way to do it, such as to highlight the
entire row-C and just specify conditional formatting once as

where B* means the cells to the left of any cell C*.

Can anyone help me how to do that?



3 Answers Found

Answer #1    Answered By: Penny Clark     Answered On: Feb 14

: I wonder if there is a better way to do it, such as to highlight  the
entire  row-C and just specify conditional  formatting once as

Highlight the column, row  or range you want to format.

Select "Conditional Formatting" from the "Format" menu.

Select "Formula Is" from the dropdown menu.

Enter "=if(B1>100,1,0)" (no quotes) as the formula.

Enter the format.

Excel will increment b1 to b2 to b3 etc. until the end of the
column. You can double check this by going to another cell  and
opening the Conditional formatting  dialog box.

While there is nothing wrong with your formula, you only need
the condition ("=B1>100") for conditional formatting.

Answer #2    Answered By: Mohammed Evans     Answered On: Feb 14

Are you searching a code in VBA or a function in Excel Worksheet?
If a code in VBA then in the Module copy this;

Sub CheckEntireRow()
Dim Counter as Integer
For Counter = 1 to 2^16
If Range("B" & Counter).Value2>100 then
Range("C" & Counter).Value2 = 1
Range("C" & Counter).Value2 = 0
End If
End Sub

Answer #3    Answered By: Abelard Fischer     Answered On: Feb 14

However, looking at your reply, I was thinking of other use for your
code. Thank you very much...

Didn't find what you were looking for? Find more on Specifying conditional formatting for the entire row Or get search suggestion and latest updates.