TechArena Community Writing a conditional formatting with Excel 2007

#1
23-10-2009
 Member Join Date: Sep 2009 Posts: 152
Writing a conditional formatting with Excel 2007

I just read the FAQs and tutorials but I am unable to write correctly the formula for a MFC that should be obvious to you all but impossible for the beginner like me. I just want to apply the MFC if the contents of the cell is equal to 1 or 2 or 3 or 4 or 5 or 6 or 7 or 8 or 9 or 10.

I do know the rules by creating 10 but I guess you can make one.
#2
23-10-2009
 Member Join Date: Jan 2008 Posts: 1,515
Re: Writing a conditional formatting with Excel 2007

So you want the formatting applied to the value 'up to' 10, then chose this parameter instead of 'equals'
#3
23-10-2009
 Member Join Date: Sep 2009 Posts: 152
Re: Writing a conditional formatting with Excel 2007

Thank you for your answer but it does not suit me because I can have values between each unit (1.25 or 4.5 for example) and then I want that formatting does not apply to the cell.
#4
23-10-2009
 Member Join Date: Feb 2008 Posts: 1,848
Re: Writing a conditional formatting with Excel 2007

To adapt to your cell, choose New Rule/Use a formula and then enter the following formula

Code:
`=(AND(A1>0;A1<11;A1-INT(A1)=0))`
#5
23-10-2009
 Member Join Date: Sep 2009 Posts: 152
Re: Writing a conditional formatting with Excel 2007

So I have a supplementary question. As I must extend this rule to thirty cells, Am I obligated to treat them one by one or is there a way to replace A1 by something else. (To "facilitate" all my cells are not grouped (from AL2 to AL6 then AL9 to AL13 and AL16 to AL20 and so on)).
#6
23-10-2009
 Member Join Date: Feb 2008 Posts: 1,848
Re: Writing a conditional formatting with Excel 2007

You just select your entire range (ie all the Cell for what you need formatting) and then you type the formula through the first cell within your range

For example, if the first cell AL2 is selected, the formula becomes

Code:
`=(AND(>0;AL2<11;AL2-INT(AL2)=0))`
and while you watch it or cell names without \$

And suddenly, it will retain the logic