highlight a cell if 2 conditions are met - looping grrr

M15tyw00d

Active Member
Joined
Nov 19, 2010
Messages
264
OK, I am irritated...

I want a cell to highlight if two conditions are true. I keep getting a looping error.

In cell A1 I want the following formula to work.
=IF(AND(ISTEXT(A1),A28="Bath Day"),cellcolor=yellow,"")

here is a copy of the area
<table border="0" cellpadding="0" cellspacing="0" width="146"><col style="mso-width-source:userset;mso-width-alt:2450;width:50pt" width="67"> <col style="mso-width-source:userset;mso-width-alt:2889;width:59pt" width="79"> <tbody><tr style="height:21.75pt" height="29"> <td colspan="2" class="xl75" style="height:21.75pt; width:109pt" height="29" width="146">DOYON</td> </tr> <tr style="height:21.0pt" height="28"> <td class="xl71" style="height:21.0pt" height="28">Date</td> <td class="xl67" style="border-left:none">9/16</td> </tr> <tr style="height:21.0pt" height="28"> <td class="xl72" style="height:21.0pt;border-top:none" height="28">Room</td> <td class="xl69" style="border-top:none;border-left:none">2015W</td> </tr> <tr style="height:21.0pt" height="28"> <td class="xl73" style="height:21.0pt;border-top:none" height="28">6:30</td> <td class="xl70" style="border-top:none;border-left:none"> </td> </tr> <tr style="height:21.0pt" height="28"> <td class="xl73" style="height:21.0pt;border-top:none" height="28">7:00</td> <td class="xl70" style="border-top:none;border-left:none"> </td> </tr> <tr style="height:21.0pt" height="28"> <td class="xl73" style="height:21.0pt;border-top:none" height="28">7:30</td> <td class="xl70" style="border-top:none;border-left:none"> </td> </tr> <tr style="height:21.0pt" height="28"> <td class="xl73" style="height:21.0pt;border-top:none" height="28">8:00</td> <td class="xl70" style="border-top:none;border-left:none">OT-D</td> </tr> <tr style="height:21.0pt" height="28"> <td class="xl73" style="height:21.0pt;border-top:none" height="28">8:30</td> <td class="xl70" style="border-top:none;border-left:none">PT</td> </tr> <tr style="height:21.0pt" height="28"> <td class="xl73" style="height:21.0pt;border-top:none" height="28">9:00</td> <td class="xl70" style="border-top:none;border-left:none">PT</td> </tr> <tr style="height:21.0pt" height="28"> <td class="xl73" style="height:21.0pt;border-top:none" height="28">9:30</td> <td class="xl70" style="border-top:none;border-left:none"> </td> </tr> <tr style="height:21.0pt" height="28"> <td class="xl73" style="height:21.0pt;border-top:none" height="28">10:00</td> <td class="xl70" style="border-top:none;border-left:none"> </td> </tr> <tr style="height:21.0pt" height="28"> <td class="xl73" style="height:21.0pt;border-top:none" height="28">10:30</td> <td class="xl70" style="border-top:none;border-left:none">OT</td> </tr> <tr style="height:21.0pt" height="28"> <td class="xl73" style="height:21.0pt;border-top:none" height="28">11:00</td> <td class="xl70" style="border-top:none;border-left:none">OT</td> </tr> <tr style="height:21.0pt" height="28"> <td class="xl73" style="height:21.0pt;border-top:none" height="28">11:30</td> <td class="xl70" style="border-top:none;border-left:none"> </td> </tr> <tr style="height:21.0pt" height="28"> <td class="xl73" style="height:21.0pt;border-top:none" height="28">12:00</td> <td class="xl70" style="border-top:none;border-left:none"> </td> </tr> <tr style="height:21.0pt" height="28"> <td class="xl73" style="height:21.0pt;border-top:none" height="28">12:30</td> <td class="xl70" style="border-top:none;border-left:none">PT</td> </tr> <tr style="height:21.0pt" height="28"> <td class="xl74" style="height:21.0pt;border-top:none" height="28">1:00</td> <td class="xl70" style="border-top:none;border-left:none"> </td> </tr> <tr style="height:21.0pt" height="28"> <td class="xl74" style="height:21.0pt;border-top:none" height="28">1:30</td> <td class="xl70" style="border-top:none;border-left:none"> </td> </tr> <tr style="height:21.0pt" height="28"> <td class="xl74" style="height:21.0pt;border-top:none" height="28">2:00</td> <td class="xl70" style="border-top:none;border-left:none"> </td> </tr> <tr style="height:21.0pt" height="28"> <td class="xl74" style="height:21.0pt;border-top:none" height="28">2:30</td> <td class="xl70" style="border-top:none;border-left:none"> </td> </tr> <tr style="height:21.0pt" height="28"> <td class="xl74" style="height:21.0pt;border-top:none" height="28">3:00</td> <td class="xl70" style="border-top:none;border-left:none"> </td> </tr> <tr style="height:21.0pt" height="28"> <td class="xl74" style="height:21.0pt;border-top:none" height="28">3:30</td> <td class="xl70" style="border-top:none;border-left:none"> </td> </tr> <tr style="height:21.0pt" height="28"> <td class="xl74" style="height:21.0pt;border-top:none" height="28">4:00</td> <td class="xl70" style="border-top:none;border-left:none"> </td> </tr> <tr style="height:21.0pt" height="28"> <td class="xl74" style="height:21.0pt;border-top:none" height="28">4:30</td> <td class="xl70" style="border-top:none;border-left:none"> </td> </tr> <tr style="height:21.0pt" height="28"> <td class="xl74" style="height:21.0pt;border-top:none" height="28">5:00</td> <td class="xl70" style="border-top:none;border-left:none"> </td> </tr> <tr style="height:21.0pt" height="28"> <td class="xl74" style="height:21.0pt;border-top:none" height="28">5:30</td> <td class="xl70" style="border-top:none;border-left:none"> </td> </tr> <tr style="height:21.0pt" height="28"> <td class="xl74" style="height:21.0pt;border-top:none" height="28">6:00</td> <td class="xl70" style="border-top:none;border-left:none"> </td> </tr> <tr style="height:21.75pt" height="29"> <td colspan="2" class="xl76" style="height:21.75pt;font-size:16.0pt; color:windowtext;font-style:italic;font-weight:700;text-decoration:none; text-underline-style:none;text-line-through:none;font-family:Arial; border-top:.5pt solid windowtext;border-right:1.0pt solid windowtext; border-bottom:1.0pt solid windowtext;border-left:1.0pt solid windowtext; background:yellow;mso-pattern:black none" height="29">Bath Day</td> </tr> </tbody></table>
Now I keep getting a loop error. So I created a hidden row that has the name repeat. in the cell below bath day. I tried to refer to that cell in cell A1 but looped again. I had a formula in the cell below bath day that was

=IF(A1="","",A1)

I can not retype the name in that cell as it is a huge spread sheet and retyping a name would be redundant...

What is a better way to do this.
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
I am sorry but I don't understand what you mean by 'looping' because formulas do not loop - do you mean that you are getting a circular reference?
You should be using Conditional Formatting to highlight the cell.
Here are links to two of many Podcasts on the subject of Conditional Formatting:
http://mrexcel.libsyn.com/media/mrexcel/podcast901.mp4
http://mrexcel.libsyn.com/media/mrexcel/podcast933.mp4
Assuming you are selecting a range of cells starting in A1 (see the reference in the podcasts about the selected cell), the formula would be something like:
=A1="Bath Day"
 
Upvote 0
At first conditional formatting was not working. Then I realized I could use an AND statement within the conditional formatting and get the results I needed.

Yes by looping I meant a circular reference.

Thanks for the help.
 
Upvote 0

Forum statistics

Threads
1,216,170
Messages
6,129,277
Members
449,498
Latest member
Lee_ray

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top