×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Conditional formatting help.

Conditional formatting help.

Conditional formatting help.

(OP)
I'd like to change a whole row background color if a cell value is odd or not.

Is that possible?

RE: Conditional formatting help.

Hello,

I think I may have found a work around.

I am trying to format row 10.

In A1 enter =A10/2
In A2 enter = =MOD(A1,1)

In A10 get the conditional formatting menu up and change CONDITION 1 to FORMULA IS and enter =$A$2>0, select the format you require.

USe the format painter from cell A10 and target row 10, i.e. select Cell A10 highlight the format painter and select 10 on the ROW HEADINGS.

maybe only a drafter
but the best user at this company!

RE: Conditional formatting help.

Hello,

Just realisd my earlier reply only works for whole numbers.
A better way would be to enter this formula in A1
=IF(ISEVEN(A10),1,0)

The conditional format is then = $A$1=0



maybe only a drafter
but the best user at this company!

RE: Conditional formatting help.

(OP)
I'll try to explain better...

I have a long list of data and in the first column I have a date.
1/1/3 DATA DATA DATA ect.
2/1/3 DATA DATA DATA ect.
5/1/3 DATA DATA DATA ect.
5/1/3 DATA DATA DATA ect.
5/1/3 DATA DATA DATA ect.

I made a formula that detects the change of the date alternating a 0 and a 1

1/1/3 DATA DATA DATA ect. 1
2/1/3 DATA DATA DATA ect. 0
5/1/3 DATA DATA DATA ect. 1
5/1/3 DATA DATA DATA ect. 1
5/1/3 DATA DATA DATA ect. 1

So in order to make the sheet more readable I'd like to change the backgroun of all cell of every row in a color if the last column is a 0 or a 1 .
Is possible select the whole table and do so in a command?

RE: Conditional formatting help.

Select the whole row you want to change.

Go to Conditional Formatting.

For your condition, use "Formula Is" rather than "Cell Value Is".

Insert one of the following the formulas:

If you have the Analysis Tool Pak installed:
=IF(ISEVEN($A$1),0,1)

Alternatively:
If you want to check for odd whole numbers only:
=IF($A$1/2=TRUNC($A$1/2),0,1)

If you want to check if the integer of a decimal number is odd:
=IF(INT($A$1)/2=TRUNC(INT($A$1)/2),0,1)

If the number in cell A1 is odd, the format will be applied to the whole row.
If the number in A1 is even, the format will not be applied.

RE: Conditional formatting help.

No way I know if to do it be selecting the whole table (with Conditional Formatting).
But it will work by selecting the whole row (like I said above)

NOTE: A1 in the above formulas would be the cell that has the 1 or 0 in it at the end of the data.

RE: Conditional formatting help.

0 is not even or odd, by the way.

If the number is only going to be a 1 or a zero, and you want the format to be applied if it is a 1, that is actually much simpler.

Select the row.

In Conditional Formatting, us "Formula Is":
=IF($A$1,1,0)

A1 being the target cell with the 1 or the 0.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources