i am trying to make a work calendar for myself. screenshot of the excel file
I have written a conditional formatting to color all saturdays and sundays with the following code
=OR(WEEKDAY(B2)=2,WEEKDAY(B2)=1)
how can i make the Entire column under that day be colored.
Thanks :)
If you are not going to be moving columns around (Friday will always be in whichever cell it is at present and days just continue in sequence to the right) it might be easier to select the entire range to be subject to formatting and HOME > Styles - Conditional Formatting, New Rule..., Use a formula to determine which cells to format and Format values where this formula is true::
=OR(MOD(COLUMN(),7)=3,MOD(COLUMN(),7)=4)
Format..., select your choice of Fill, OK, OK.
Adjust 3 and 4 to match whichever day you choose to start the sequence with wherever your selected range starts.
Given information you have withheld of what is where the above might be simplified.
In Conditional formatting | Use a formula...
=WEEKDAY(B$2,16)<3
extended from B2 down and across.
Looks like you need to add a relative cell reference on B2:
=OR(WEEKDAY(B$2)=2,WEEKDAY(B$2)=1)
Here's an article about using relative references in conditional formatting: https://www.ablebits.com/office-addins-blog/2014/08/07/relative-absolute-cell-references-excel-conditional-formatting/
Related
I have been trying to do this myself for a good few weeks now but it seems I do require some expertise here!
As I state in the Title, I'm trying to format duplicate values ONLY if date (located C1:AG1) =today. The values per day are in cells C2-AG28, the table of reference is AI2:28.
I don't have enough reputation to submit an attachment so I hope this is enough information for someone to shed a light on this.
Conditional formatting.
Click cell C1 and click conditional formatting and then new rule.
For the rule, use a formula to determine which cells to format and use this formula:
= C$1=TODAY()
Change the format to whatever you want and then apply this rule to the desired range (C1:AG28).
Clear any existing CF from the relevant range, select it and HOME > Styles - Conditional Formatting, New Rule..., Use a formula to determine which cells to format and Format values where this formula is true::
=AND(C$1=TODAY(),COUNTIF(C:C,C1)>1)
Format..., select choice of formatting OK, OK.
Select the range C2:AG28 and create a new Conditional Formatting rule using a formula. The formula should be entered as follows:
=AND(C$1=TODAY(),COUNTIF(C$2:C$28,C2)>1)
The first part, identifying the column containing today's date in the first row is self-explanatory. The countif section of this formula works by identifying only those values which appear more than once in the column (e.g. having a count > 1). The way we limit this to a particular column, rather than the entire table, is by omitting the $ in front of the column in the address.
thanks in advance for the help.
I'm making a Gantt chart in Excel and am trying to integrate the capability to highlight the work week (WW). The idea is that one can select the WW from a drop down menu and the corresponding columns in the chart are highlighted. I am struggling with the conditional formatting formula to highlight the desired dates.
Here's a screen shot of how the chart is set up
I am able to highlight the column of the cell containing the WW value (e.g. in picture column I is highlighted as it contains "WW42" in cell I3. I would like to be able to highlight the days from Sunday to Saturday of each WW.
Most formulas (that I know) work on the value of the cells rather than their location or index. I have tried simply filling in all the blank cells with the WW value and then hiding the value, but the formatting isn't aesthetically pleasing and it's not efficient.
I have also tried merging the WW cells, but am unable to select all columns of the length of the merged cell, just the first column associated. For example, if I merged I3 to O3, conditional formatting will highlight that merged cell and only column I.
Any suggestions on how to approach this is greatly appreciated!
Attached is a screenshot of my structure with my conditional formating working as required. You'll need to adjust acording to your structure, but I used a formula-based conditional formating, with the rule:
=COUNTA($B$2:B$2)=$A$1 //Where A1 contains the workweek I want to highlight
Entered into cells $B$3:$V$6. Of course, in your case you'd have to change it to something like:
=COUNTA($B$2:B$2)+41-3=$A$1
Since your work weeks start at 42 and you have 3 extra headings you dont want added on your sum (ACTUAL START, ACTUAL DURATION and PERCENT COMPLETE). Also the header for the work week has to be a numeric value, but you can play around this to get what you need. Let me know if you'd need further help.
You do not need to use the third row for your conditional formatting, if row 4 has legal excel dates. The WEEKNUM() formula gives you exactly what you need.
If your Dropdown Menu is in cell B2 and consists of numbers from 1-52 then this should work for your conditional formatting:
=$B$2=WEEKNUM(D$1)
See attached photo.
i'm newbie in excel and i have an excel sheet where i need to change the cell color if the date mentioned in the cell is becomes 15 days old and also add a status in next column as pending.Please help with this.
Assuming your dates are in ColumnA, please select that column and HOME > Styles - Conditional Formatting, New Rule..., Use a formula to determine which cells to format and Format values where this formula is true::
=TODAY()-A1>=15
Format..., select your choice of colour for formatting, OK, OK.
If the "pending" labels re then to be added in ColumnB where appropriate please put in B1 and copy down to suit:
=IF(TODAY()-A5>=15,"pending","")
You could use the pending in ColumnB to trigger the colour for ColumnA but it may be better to keep the two requirements separate. If you were to trigger via 'pending' you would still need a formula rule, rather than a "cell content" one.
Change 15 to 20 when you have decided what the interval should be. Beware that if your ColumnA values include times (even if not displayed) you cannot reliably simplify >=15 to >14.
This is the formula you might be looking for:
=IF(DAYS(TODAY(),A1)>=15,"pending",other_status_you_use)
Then you should go to
Conditional Formatting > Highlight Cell Rules > Text that Contains...
There you can type pending and change the color as you wish.
I have created conditional formatting in a date column to show red if it's expired, orange if it's 30 days out from expiring. My boss now wants me to apply this to every register/database that exists. Problem is that some of the worksheets have multiple date columns and are not one after the other.
I haven't worked out how to copy and/or past the conditional formatting to the other date columns on the worksheets without redoing the conditional formatting from scratch.
Any solutions?
Assuming this is for Excel and you are dealing with entire columns then I suggest starting again (so we know what formulae are in use and that the Applies to range is a complete column) with, say for ColumnA, HOME > Styles - Conditional Formatting, New Rule..., Use a formula to determine which cells to format and Format values where this formula is true::
=AND(A1<>"",A1<TODAY()+30)
Format..., select orange, OK, OK.
Then repeat for red with:
=AND(A1<>"",A1<TODAY())
If these suit for ColumnA you should then be able to pick any one of the conditionally formatted cells, click Format Painter then, select whichever other columns you wish the rules to apply to.
Note that the order in which these rules are applied is significant. In Conditional Formatting Rules Manager red should be above orange (their order may be changed with the up/down arrows) and I'd suggest for red checking Stop If True).
I am trying to implement the following logic but my formulas are not encompassing all possibilities.
Am I able to accomplish the following using the approach outlined below?
C5 has a start date(yy/mm/dd), 2013-10-01.
D5 has an end date(yy/mm/dd),2013-10-23.
F3->CX2 has 7 cells merged with the monday's date in the cell.
Example: F3: 30-Sep-13, M3: 07-Oct-13, T3: 14-Oct-13.
F4->CX4 and below are the unmerged seven cells, therefore you have seven cells below each week cell.
My goal is to use Conditional Formatting when cell has value TRUE to fill the background colour of each individual cell between the start and the end date. However I am having trouble determining the correct formula. I have tried the following in F4 and across and below but none have proven to work for all scenario's:
F4=AND(C5=F3, D5>=F3) F5=AND(C5=(F3+1), D5>=(F3+1))...
only fills the cell for the start date not all the cells between the start and end date.
In short, I need to identify the start cell and fill it, continue filling all cells until the end date.
Should this be a macro with a while loop?
***I Believe I have solved my question with the following formula:
=IF(AND((F3)>=$C$5,(F3)<=$D$5),TRUE,FALSE), =IF(AND((F3+1)>=$C$5,(F3+1)<=$D$5),TRUE,FALSE), =IF(AND((F3+2)>=$C$5,(F3+2)<=$D$5),TRUE,FALSE)...Then after 7 cells it becomes: =IF(AND((M3+1)>=$C$5,(M3+1)<=$D$5),TRUE,FALSE), =IF(AND((M3+1)>=$C$5,(M3+1)<=$D$5),TRUE,FALSE)
Should this be a macro with a while loop?
It seems it does not have to be, though that depends upon my interpretation of your question, which seems odd if only because the conditions are not in the rows for which they trigger the formatting.
Select the applicable range starting in F4 and HOME > Styles - Conditional Formatting, New Rule..., Use a formula to determine which cells to format and Format values where this formula is true::
=AND($F$3+COLUMN()-6>=$C5,$F$3+COLUMN()-6<=$D5)
Format..., select choice of formatting, OK, OK.
Here's a stepwise view on the problem as I see it:
Set up your data and include the actual date of your "weekly view" as part of the sheet:
Add conditional formatting to a single cell (say, Monday of Week 1) that applies to "a formula to determine which cells to format":
Copy-and-Paste-formats to the remainder of the cells:
The result should resemble:
Change the actual cell formatting to "" to remove the date from view:
The removes the capability to insert any content in the cells (but that wasn't part of the question). If you want to insert content and maintain colouring, you can base the conditional formatting on a similar-sized/shaped layout elsewhere in the sheet and format it accordingly. For example, the following layout provides this yet allows you to enter content in the conditionally formatted area:
Use the formula conditions. I put a start date in A1, and an end date in A2. Modify as needed per your requirements.
Then I will apply conditional formatting to values in range E1:E6. Again, modify as per your requirements.
Then simply use Highlight cells Rules > Between
Then, select your start/end values and press OK. Voila!