color every nth row in excel - excel

I understand (in a limited way) how to use conditional formatting in Excel 2010.
I have a calendar type of display across many columns, in one row, like this:
1 2 3 4 5 6 7 8 ...
I want to color 2 days green, 2 days red, 2 days orange, 2 days blue, then repeat.
I could do it manually, but I'd like to make a calendar that displays more than just this year. Leap years change the format, the 1st doesn't always come on Monday, etc.
Is there a way to do this with conditional formatting so that when the calendar updates, the colors do as well?
Each day/date occupies a single cell.

As a starting point try using this as a a formula for conditional formatting. This will effect every other row.
=MOD(ROW(), 2)=1

I understand you want to use the conditional formatting and not vba to do this. I have a calendar in which I highlight weekends, but you could extrapolate it to your case.
The formula you're searching for is the so called WEEKDAY How the week starts is self explainatory if you try it in a cell.
Let's say your dates are in the range A1:A30. The condition which will trigger the formatting would be =OR(WEEKDAY(A$1;2)=1;WEEKDAY(A$1;2)=2) for Monday and Tuesday =OR(WEEKDAY(A$1;2)=3;WEEKDAY(A$1;2)=4)) for Wednesday and Thursday
and so on.
Excel will handle leap years for you, so don't worry about that. And to fill the days, just type the first one in A1 and in A2 =A1+1and expand it all along.

Related

How to use conditional formatting for values that are a certain amount higher than the above cell?

I'm having trouble using Conditional Formatting in Excel. I am inexperienced so apologies if this is an easy fix.
Basically, I have a table of accounts, and the number of orders they have in a matrix style. For each order they make, the number of days since they made that order is added into the table.
Order Quantity is the order number, so the 9th order Clara made was 2416 days ago
I wanted to show that if, for example, Abbie's 3rd order was over a year after her 2nd order (which it is), then highlight it red. If it's between 6 months and a year, yellow, and if it's under 6 months to make it green (if it's possible to have more choice that would be even better, so last 30 days, 90 days, etc.).
However, when I write this into the formula section of the conditional formatting area, and drag the formatting down, the cell numbers stay the same, so they would all base their values on whether the 5th, 6th, 7th orders were over a year since her 2nd order.
I wanted to make it to show the 3rd against 2nd, 4th against 3rd, 5th against 4th and so on. (And obviously I would like to do this with all accounts). How would I go about this?
The only way I can even think of it working after the problems I've had is to do them all individually, which would be very time consuming.
=$J$5 < $J$4 - 365 is the formula that is written. I've gotten rid of the $ but they automatically reappear, and even when they don't, the cells don't change.
This time I'll translate for the non-fake-German speakers..
The formula should not be with absolute references when the conditions aren't absolute, i.e. $B$2<$B$1-365 over the range =$B$2:$G$13 would color all cells in that range red since B2 is in fact smaller than B1 - 365
The formulae in English:
AND(ISNUMBER(B1),B2>B1-180)
AND(B2<B1-180,B2<B1-365) (yes, I had
360 in the img, don't ask why)
B2<B1-365 (no change there ofc)

Conditional Format to highlight past and future dates

I have a spreadsheet that has 5 columns of dates the all refer to one key date.
The key date is the date of sign off for a piece of work, the other columns reference that date, and subtract 2, 6, 8, 10 and 14 days to show the dates that each stage needs to be completed by.
The conditional format I want to be able to create needs to take the day (TODAY()) then look across all dates and apply the following format:
If dates in the range are this week, then highlight the cells green
If dates in the range are last week, then highlight the cells amber
If dates in the range are greater than last week, then highlight the cells red
If dates in the range are greater than next week, then highlight the cells light green
Every option I've tried the range only gets one of the formats applied.
The purpose is to allow my team to see at a glance actions that need to be closed because they are either out of date, or just about to be.
Any help is very much appreciated.
Thanks,
Andrew.
You will need to add three conditional format rules to make this happen and each will need to be based on a formula.
Formula to identify dates older than 2 weeks:
=DATEDIF(C12,TODAY(),"d")>14
Formula to identify dates last week:
=AND(DATEDIF(C12,TODAY(),"d")<=14,DATEDIF(C12,TODAY(),"d")>7)
Formula to identify dates this week:
=AND(DATEDIF(C12,TODAY(),"d")<=7,DATEDIF(C12,TODAY(),"d")>0)

Excel display dates horizontally

I am trying to develop an Agile sprint spreadsheet that takes into account the effort spent on each task on each day.
At the top of the sheet i have two fields, Start date and Sprint Duration.
What i want to achieve is underneath this, display the dates, starting at the first date and extending horizontally to the right.
Is this possible to achieve?
Today 7/19/2018
Duration 14
Start 7/19/2018
End 8/2/2018
Task Estimated Effort Actual Effort 7/19/2018 7/20/2018 7/21/2018 7/22/2018
Data Migration 10 5 2 3
Design 7 7 3 4
Groups 1 7
Where the dates displayed are displayed dynamically as outlined in the question above
Using Duration in B2 and Start Date in B3 you could use these two formula:
The first date in cell D6 (7/19/2018) is the Start Date and will always be visible, so a simple formula can grab that:
=$B$3
The rest of the dates needs to check if the previous date is less than the Start Date plus Duration days. If it is then put the previous date plus 1 day, if not then leave the cell blank. The formula is placed in cell E6 and dragged across as far as you need.
=IF(D$6<SUM($B$2:$B$3),D$6+1,"")

Conditional Formatting based on weeknumber

Fellow Excel Enthusiasts,
I'm looking for a way to use conditional formatting to check if my invoice should be payed.
Added picture is how my data looks at this point in time.
What I am trying to achieve, is that when in column J the value (=weeknumber based on 25 days after date in column H) equals the week we're in, it should color the full row and keep it like this.
I've achieved the full row with conditional formatting, but still remain with 2 problems.
How to determine if this value in Column H is the same as the week we're in now? How do i keep my conditional formatting, so that when it is week 8 this row with week 7 remains coloured?
If conditional formatting is the wrong way to go, please tell me. I am learning, and would like to learn, not just a straight up answer how to fix my problem.
Using WEEKNUM you can use the following:
=WEEKNUM(H4+25, 2)<=WEEKNUM(TODAY(), 2)
The 2 in WEEKNUM indicates which day of the week to take as the first, after 1st January (which is week 1)

Conditional format of date where 3 working days greater than cell value

I am trying to adapt a number of forum posts and previous stack questions like this.
Let's say I have a date Column A2, A3, A4 etc.
I want to be able to utilize the WEEKDAY function to evaluate my condition when only in a Weekday and also 3 days greater than the date in Cell A(x).
So far my attempts have failed or I have not got the results I want. Excel is not my strongest point when it comes to conditional formula formatting.
I think it may be something like:
=WEEKDAY(A$2,2) <=5 AND 'My Cell Date' > 3 Days WHERE those 3 days are weekdays.
Also if it is possible, I want it to work like:
If day 1 of 3 is Thursday, day 2 of 3 is Friday and day 3 of 3 is Monday then apply formatting.
Could anyone help me out with this one please?
Edit not from OP to copy clarification from comments:
If the today date is 3 working days greater than the cell date change to red.
Say A2 has a received date and B2 has a completed date. The completed date is my target. Is it 3 working days greater than received.
Was not quite certain of the requirement (but seem to have hit upon an acceptable solution!):
Use =NETWORKDAYS(A2,B2)>2 under Format values where this formula is true: under Use a formula to determine which cells to format in Conditional Formatting.
NETWORKDAYS
Returns the number of whole working days between start_date and end_date. Working days exclude weekends and any dates identified in holidays.
The syntax is:
NETWORKDAYS(start_date,end_date,holidays)
Dates should be entered by using the DATE function, or as results of other formulas or functions.

Resources