Cunditional formatting with greater than and weekday parameters

Jeffrey021286

New Member
Joined
Nov 16, 2021
Messages
6
Office Version
  1. 365
I am trying to conditionally format a cell that contains a formula based on the day of the week that it currently is and the value that the formula is outputing. I want the cell to be highlighted if the curent day is Tuesday and the value is > 14.9 , Wednesday and the value is >29.9 , Thursday and >44.9 , Friday and >59.9 , and Saturday and 70.9. I have tryed to make a "if and" table with all the weekdays and just conditionally format the desired cell if it was > to cells in the table but found that when comparing the desired cell to a cell containing a formula it doesn't work
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Welcome to the Forum!

AB
1Wed 17 Nov 202129.91
Data
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B1Expression=AND(WEEKDAY(A1)>2,B1>CHOOSE(WEEKDAY(A1,12),14.9,29.9,44.9,59.9,70.9,,))textNO


I can't help but wonder whether Saturday should be 74.9? If so, you could simplify to:

=AND(WEEKDAY(A1)>2,B1>15*WEEKDAY(A1)-30.1)
 
Upvote 0
T
Welcome to the Forum!

AB
1Wed 17 Nov 202129.91
Data
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B1Expression=AND(WEEKDAY(A1)>2,B1>CHOOSE(WEEKDAY(A1,12),14.9,29.9,44.9,59.9,70.9,,))textNO


I can't help but wonder whether Saturday should be 74.9? If so, you could simplify to:

=AND(WEEKDAY(A1)>2,B1>15*WEEKDAY(A1)-30.

Welcome to the Forum!

AB
1Wed 17 Nov 202129.91
Data
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B1Expression=AND(WEEKDAY(A1)>2,B1>CHOOSE(WEEKDAY(A1,12),14.9,29.9,44.9,59.9,70.9,,))textNO


I can't help but wonder whether Saturday should be 74.9? If so, you could simplify to:

=AND(WEEKDAY(A1)>2,B1>15*WEEKDAY(A1)-30.1)
Thanks that did the trick. I have another complex request if you have the time and desire to take a swing at it. Basically the numbers in the last formula where to track a production target throughout the week. The values where .1 less than the target so once I passed 14.9 I hit the target of 15 and so on. I also would like to have a cell with a formula that tells me how much I am currently short or past the dailey target thought out the week. Cell m5 adds several cells together and is what I applied your excellent formula to and I want k5 to return a value that shows m5 minus the daily targets of 15, 30, 45, 60, and 71. Any suggestions?
 
Upvote 0
Can you please post some sample data and your required results, preferably using the XL2BB add-in: XL2BB - Excel Range to BBCodeI figured out a way to make it happen.

Can you please post some sample data and your required results, preferably using the XL2BB add-in: XL2BB - Excel Range to BBCode
I figured out a way to do it. It wasnt elegant but I made a table with a bunch of if function referencing a weekday cell to give the target values if true then had the cell I wanted to give the final value = the sum of the table - m5. Thanks again for all your help. I periodically try and do things that are pretty complex and sometimes outside my scope next time I end up stuck could I reach out to you directly you seem to be very fluent with this.
 
Upvote 0
Solution
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

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