Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conditional Formating - 2 conditions 1

Status
Not open for further replies.

SBaugh

Mechanical
Mar 6, 2001
6,685
I am trying to find some help on setting up a conditional formating that has 2 conditions that are true. The problem I am having is that I need certain cells to highlight per month (equal or greater than) and the other condition is the selection value that ultimately determines the color.

Example Spreadsheet:

Per this Formula, it highlights the entire row, not just the cells equal to or greater than the current month.
2_conditions_pb2kss.jpg


Is there any way to make this work or is there a different way I need to look at this? If VBA would allow this to work I am fine doing it like that as well, not sure how to write the code though.


Scott Baugh, CSWP [pc2]
CAD Systems Manager
Dapco, INC

"If it's not broke, Don't fix it!"
faq731-376
 
Replies continue below

Recommended for you

The spreadsheet works great, but when my manager moved over 2022 he wants the grey to reset to the new year and then follow through the month to month as it does now. He doesn't want to wait until Jan of 2022

Its in the Conditional format:
Cond2_sqxp8g.jpg


Scott Baugh, CSWP [pc2]
CAD Systems Manager
Dapco, INC

"If it's not broke, Don't fix it!"
faq731-376
 
I'm having trouble understanding. Future is future regardless of year. But is it that he wants Jan 1, 2022 to be formatted different than Dec 31, 2021 is today?

Isn't the grey format a past month's format? I'm look at the chart on 7 Sep 21 18:31. Grey is in the past. I'm not understanding.

The day 2022 arrives, won't the whole chart be unformatted (background color/white)?

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
You are correct in 2022 the whole thing will reset back to white and each following month in 2022 will grey out.

He wants to be able to change the year in G1 to 2022 and for that to force the grey to reset back to white and then follow the month-to-month process over again. He does this so he can prepare for the next year prior to Jan 1st of 2022 or whatever the following year might be. Does that make sense?

Scott Baugh, CSWP [pc2]
CAD Systems Manager
Dapco, INC

"If it's not broke, Don't fix it!"
faq731-376
 
So what you're saying that the app does not take the G1 year value into account?

If that's the case...

=AND(G$7<MONTH(TODAY()),$G$1<=YEAR(TODAY()))


Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
With respect to your signature quote...

A sign over the facsimile machine in a store selling old music scores...

If it ain't baroque, don't fax it.

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor