To start I have all the days of the month going across row 2 using up columns G through AI.
I also have in row 3 from columns G through AI the following function =IF(G$2=TODAY(),1,) This function changes according to the column: H$3, I$3, J$3 … etc to AI$3
Below this are series of tasks that are divided by date depending on what is being done that day so I will refer to this area as the ‘task area’.
What I’ve been using in the task area is the conditional formatting “Use a formula to determine which cells to format”. When I reference the first column I use $G$3=1 and then apply the formatting to this column (in this case border the left and right side of all cells affected) and it works fine. I’ve run into a problem in that I now have to set up a rule for every column from G3:AI3. It is workable but not what I would like to ideally have set up, and it creates in some months 31 rules (this example 28 as I’m working in February) that are in existence to provide the formatting effect I want.
I’m wondering if there are any suggestions or directions to achieve the ideal which is one rule that can apply to the entire task area, but be able to work within the parameters, in this case the date of each individual column?
I have tried using the formula G3:AI3=1 but this comes back as an error as the rule for the conditional formatting. I have toyed with using cell values but as it stands the task area already has conditional formatting applied and found this conflicted with this conditional formatting, and really didn’t look the way I was hoping anyway. I hope this is clear, thanks for any suggestions.
Related
I'm trying to create an Excel sheet that will be tracking some of our autonomous processes and their access privileges at my company and I've run into an issue with Excel..
I'm trying to alternate row colors, which in and of itself isn't an issue, however the fact that I've got merged rows are giving me issues.
As of right now I've got 5 columns with headers in A through E. Column F is being used for conditional formatting to color the rows. In column F this formula is present:
=MOD(IF(ROW()=2,0,IF(A2=A1,F1, F1+1)), 2)
This works great if I want to repeat the leading Column item over and over, however I'd like to reduce the visual clutter and increase clarity, so I've merged some of the rows in the Column A because multiple rows in B:E correspond to it.
I've merged A2:A4 right now and the formula picks up the A2 and A4 as blank, but A3 (the text in the merged cell is centered) is recognized as different that A2 and A4 because the text resides there. I'll upload an image to give a better idea of what I'm talking about as well.
If anyone can give me a tip on how to alternate row colors with merged cells/rows that'd be great, I've done a lot of googling and searching on stackoverflow, but for the most part I've only found things that pertain to unmerged rows/cells.
Image Example: https://imgur.com/a/UDbRVWA
=IF() Condition that worked for me:
=MOD(IF(ROW()=2,0,IF((A2=0),IF((OR(A1<>0,A2=A1)),F1, F1+1),F1+1)), 2)
There is an answer below with a picture I posted, however, for most situations I would recommend the method suggested by #BruceWayne. It's far more sensible than working with merged cells!
I ended up finding a solution with just some clever working with the Conditional IF() statements. I think the key was taking into account that the Merged Cells that weren't the top (i.e. If I merged A2:A4, A2 is top, A3, A4 bottom) were equal to 0 while the top was set to the value of the text within the merged cell. Using the formula below I was able to achieve the result I was after:
=MOD(IF(ROW()=2,0,IF((A2=0),IF((OR(A1<>0,A2=A1)),F1, F1+1),F1+1)), 2)
And here is a linked screenshot: https://imgur.com/a/gNaC62c
I then just added conditional formatting for every row but row 1: =$F2=1. I'll be hiding column F to make it seem less obtrusive.
For future reference, I would agree with what #BruceWayne mentioned in that a simpler formatting that gets the job done would be preferable. There are many other ways to format this in a way that makes much more sense, but I felt like I was close when I was tinkering with it, so I stuck with it another 15 minutes or so and was able to pull out a usable formatting condition.
Might I make a suggestion? If the merging rows is to increase clarity with repeated entries, perhaps we can use another Conditional Formatting rule to make it more legible.
Say you have data that looks like this:
But, we don't want to see <Process #> duplicates in the A column. We could merge these cells and center it along the rows. But again, merging cells is generally frowned upon I've found. (It makes it tricky to format, conditional format, copy/paste, do any VLOOKUP()/Index/Match, etc.)
First, let's get the rows alternating colors. I'm using fill of RGB(183, 255, 253):
New Rule 1 -
Formula: =MOD(ROW(),2)
Applies To Range: $A$2:$E$9
Format: Fill with color RGB 183, 255, 253 (...or whatever you want, just note the RGB for later)
Now, we get this:
Okay, making progress. Now, let's work on hiding the duplicate values in column A.
So, let's apply some more Conditional Formats. We'll need two for column A, one to set the font to White, one to set the Font to that blue fill color.
New Rule 2 -
Formula: =AND($A3=$A2,MOD(ROW(),2)=1)
Applies To: =$A$3:$A$100
Format: Font --> Color --> RGB(183, 255, 253)
New Rule 3 -
Formula: =AND($A3=$A2,MOD(ROW(),2)=0)
Applies To: =$A$3:$A$100
Format: Font --> Color --> White
Now we have:
IMO, we can do one more thing to clarify the breaks in Processes:
New Rule 4 -
Formula: =$A2<>$A1
Applies To: =$A$2:$E$100
Format: Border --> Top Border
Now, we have a nice new CF table.
Okay so I'm new to all this- please help me if there's a better way to do this... currently trying to make changes to an existing spreadsheet and I can't figure out how to accomplish what I want...
Tab 1 accounts for different numbers and their assignments, Tab 2 rearranges that data for a printable page, and Tab 3 has a list of all the numbers we have to account for, and currently uses conditional formatting to do so. (Green if the number is accounted for on Tab 1, Red if not)
What I am trying to accomplish is create a list of all the numbers NOT accounted for (Red conditionally formatted cells on tab 3) to show up in any form on Tab 2. I started messing around with the =mycolor and IF functions, but I found that only works with explicit formatting of the cell, not the conditional formatting I am using to account for the numbers.
Do I need to change how my spreadsheet is accounting for the numbers from Tab 1 instead of conditional formatting? If so what would be the best way to go about this? If there's a way to do this with conditional formatting, how would I go about copying data based on the conditional formatting of certain cells?
Also, ideally I want this to be done without having to play a macro. I'm trying to make this as stupid simple for the end user as possible... but if there's no way to do it without recording a macro then that's what I'll end up doing.
Thanks a bunch in advance...
What I would do is add a column to tab three that is a missing/not missing column (=column C in my mock up below). Missing = 1 accounted for =0. (That can either be achieved by the same formula as used to give the red/green OR a vlookup() function). Therefore for each red row there will be a 1 alongside.
Extending that, as per my comment... index the missing values (col A=):
=IF(C3>0,SUM(C$1:C3),"")
Now use a new pair of columns to grab the missing values
And use a lookup function to line up the missing values (col G)... I only went up to 5 (col f)
=IFERROR(VLOOKUP(F3,A$3:B$6,2,FALSE),"")
THANK YOU for your help Richard!
With some changes, the Vlookup function you gave me (in Column E) worked fine:
=IF(ISERROR(VLOOKUP(E2,hiddenradios,1,FALSE)),"1","0")
And adding the second column(s) and the sum function for values was a really helpful idea: (column H)
=IF(VALUE(F2)>0,SUM(G$2:G2),"")
For whatever reason I couldn't make vlookup work, even with the column relocated to the left of the number I was trying to return, but I was able to do the same thing with an INDEX/MATCH formula in column J:
=IFERROR(INDEX(E$2:E$100,MATCH(I2,H$2:H$100,0),1),"")
Not quite as simple as yours, but you set me on the right path with adding column(s) and I wouldn't have figured it out without your help... thanks again!
enter image description here
Struggling a little with two multi conditional formula issues at the moment:
The first is I have a number of dates in Column B of a sheet (that represent the date something was created) and I am trying to make a formula that will allow me to have all the dates that are 90 days to 179 days old (from the date they were created) shade yellow and all the dates that are 180 days old and above shade red. I also need all dates that meet neither of those conditions (0 to 89 days old) to stay normal. This would obviously use the TODAY feature to constantly update based on the date.
The second issue is in Column N I need to show the date in column B plus 90 days, but if there is no information in column B, I need it to show nothing. I can make this work with a very simple N = b2+90 but that obviously means the cell will contain '90' if no date is yet applied in b2.
Any help would be appreciated, I can generally make one of these conditions work but not all at the same time. I have trawled the web for answers but making a formula to meet all those conditions is proving difficult.
Thanks
For the second issue, use an IF statement
=if(B2>0,B2+90,"")
For the first issue, start by building the logic into worksheet cells temporarily, then combine them with OR() or AND() functions and once you have them working, get them into a Conditional Formatting formula.
A progression of helper formulas would be like the following, who each return either a true or a false.
=TODAY()-B2>=90
=TODAY()-B2<180
=and(TODAY()-B2>=90,TODAY()-B2<180)
The last one above is the formula needed for the yellow rule.
And the red rule should be fairly obvious
=and(B2>0,TODAY()-B2>=180)
Apply these two rules to cell B2 and copy the format down with the format painter or in the "apdpdlies to" section of the Rule Manager.
In N2,
=if(count(b2), b2+90, text(,))
Create two conditional formatting rules based on these formulas,
=and(today()-b2>89, today()-b2<180) <~~yellow
=and(count(b2), today()-b2>=180) <~~red
For the first question:
Setup two conditions, the first one, to colour the cells yellow should have the following formula:
=IF(ISBLANK(I13),0,DAYS(TODAY(),I13))>89
And the second one, to colour them red should have:
=IF(ISBLANK(I13),0,DAYS(TODAY(),I13))>179
Answering your second question:
=IF(B2="","",B2+90)
*Formulas edited so result isn't true if cells are blank
Thank you in advance for whatever help you may be able to provide.
Purpose/Scope
Analyzing the effectiveness of retail store renovations and relocations.
Existing Material
I have many slices or views, but let's assume there is only one.
The back-end looks like this. Please note that empty cells will still have a formula in them as they are being populated from a data dump.
Back-End
The front-end looks like this and is populated with an 'Averageifs' formula, simplified example is below. "CompStores" is a named data range.
=IFERROR(AVERAGEIFS(CompStores[Growth Year 2],CompStores[Action],$A1),"")
Front-End
Just for clarity, the counting table (if needed) would look like this. Hopefully this project will not need a counting table, especially considering switching "averageifs" to "countifs" cannot easily be done by a search+replace because countifs has less arguments.
Counts
The Task
• Highlight each cell in the front-end based on how many observations there are with the purpose of knowing how confident we are in that growth %.
• The counting system I would like to use in real life is under 5 observations = red, 5 to 9 = yellow, 10 or above = green.
Here is an example output based on the count and colours I will use in real life.
Sample Output
Please help me, I really don't want to have to do this by hand lol. Thanks to anyone who even attempts to help!!!
Whenever I have several conditions for conditional formatting, I always prefer to non-conditionally (permanently) format the cells with the most complicated condition and then use subsequent conditional formatting rules to "override" the base formatting.
In this case, since yellow is the most complicated condition (since yellow falls within a range and has two bounds, as opposed to red and green which just have a single bound), I permanently formatted the entire range (B2:E3) as yellow and then made two conditional formatting rules (one for red and one for green) to override the yellow base formatting.
See below screenshots of simplified versions of your data.
Is there a way to change over 1000 color condition cells? I need to modify the font color and style. I am pretty new to VBA but I'm sure it can be done faster than highlighting the entire sheet and modifying each rule one-by-one. I do know that I can do the manage rules but I have over 60,000 cells with an average of 5 cells conditioned to one cell. In other works:
Cells A:1 through D:1 are test scores. These scores need to be changed to green if the score is more than or equal to the minimum passing score.
If (A:1) >= passgrade then set color to green.
I know there is an easier way than setting it manually. For now I have to change the individual cells accordingly (some with duplicate upon duplicate upon duplicate (etc) rules...one set of cells took 20 minutes just to delete all the excess rules (lesson learned, just use the delete all conditions when that happens).
Is there a simple code that can reference the cells (objects?) in Excel to speed this condition up?
I'm using Excel 2007. Hope that makes things clearer. Thanks!
I'm not totally sure if this is what you're looking for, but it sounds like you have more rules than necessary. If you go to Home -> Conditional Formatting -> Manage Rules... it will bring up a list of all of your rules and the range on the sheet that the rules apply to. In many cases such as this, you can accomplish what you are trying to do by deleting duplicate rules that do the same thing but apply to different cells. Does this get you what you want?