Conditional Formatting exact text match - excel

I have several spreadsheets where I want to highlight all the rows where the data matches a separate list. I have used a rule for this but it's not highlighting it exactly; it's just matching part of the word, for example General manager in one list is highlighting Manager in the other list whereas I would only want it to highlight General manager.
This is the formula I've used:
=COUNTIF(A92:A400,L2:L196)
and I've also tried MATCH but it pulled out out even more incorrect matches.

You will have to bring in the EXACT function somewhere.
    
This CF rule was created by selecting A1:D7 and creating a rule based upon the following formula,
=AGGREGATE(15, 6, ROW(1:1)/EXACT($A1, $F$8:$F$10), 1)

The way I interpret the question is that case sensitivity may not be required, rather that use of wildcards may be causing issues (ie that exact text match is not applying "exact" in quite the same way the EXACT function does). If the separate list is the one in ColumnL then please select from A92 to A400 and HOME > Styles - Conditional Formatting, New Rule..., Use a formula to determine which cells to format and Format values where this formula is true::
=COUNTIF(L$2:L$196,A92)
Format..., select your choice of highlighting, OK, OK.
If to be applied to several sheets it may be convenient to Name the L2:L196 range.
The above highlights cells rather than rows, but that could be adjusted.

Related

Count number of cells in a column with conditional formatting from VLOOKUP

I've done some searching and I can't find anything that seems to match up with what I'm trying to do precisely. I'm familiar with Excel, formatting, and formulas, but by no means a master.
I have three sheets - Summary which is where the count value should be done, Tracker which is where the range to count is, and OrigTrackerData which has data used in the conditional formatting formula.
What I'm trying to do is count the number of cells within a certain table column that have a certain conditional formatting rule applied (rule below).
Here is the conditional formatting rule:
=A1<>VLOOKUP($A1,OrigTrackerData!$A:$L,COLUMN(),FALSE)
The intent of the rule, which is applied over the entirety of Table710 which exists in Tracker, is to determine which cells have changed relative to OrigTrackerData, regardless of row order of the two sheets - column A of both sheets have an "index" of sorts.
I've gotten as far as something like =COUNTIF(Table710[Notes], ???) but I can't determine how to convert the conditional formatting formula to a COUNTIF condition.
I am open to accomplishing this via VBA as well - I originally attempted to do so using color functions found here: http://www.cpearson.com/excel/colors.aspx but those functions apparently don't work on colors applied by conditional formatting.
Edit: BYate's comment neatly obviated the need for this. I am curious if something like this is possible though, but now just out of idle curiosity.

Coloring cells that have matching text

I have a set of required items spread across A1:H40 and a buylist in col. J. I was reading this, but I'm a bit overwhelmed.
How do I color the cells across A1:H40 with text that match the ones in col. J?
Is there a way to incorporate this function into a button so that it can be applied to other spreadsheets as well (or any other efficient way)?
In addition, is there a way to design a fool-proof script that eliminates the excessive spaces at the end of each cell due to typing errors?
Clear existing CF from and select A1:H40 and HOME > Styles - Conditional Formatting, New Rule..., Use a formula to determine which cells to format and Format values where this formula is true::
=COUNTIF($J:$J,A1)
Format..., select formatting of your choice, OK, OK.
Seems to me not to require a button to make this any easier, and 'spaces' is a completely different Q that should not be combined with another.

Using an array based formula in conditional formatting

What I am trying to do with excel is a bit unorthodox, but I need a method of cleaning the data people import in to TechExcel's DevTrack. DevTrack creates values for fields if what you attempt to import is not 100% accurate to what exists already in the project, leading to duplicate values with slightly different formatting.
What I have come to is having a "validator" excel sheet; people copy/paste what they want to import, and anything that doesn't match a data validation table is highlighted.
Data validation itself does not work because copy/paste overwrites it and it is a waste of time to enter data manually.
I have managed to get conditional formatting working partially using this formula:
=ISERROR(MATCH(C5,D:D,0))
However it is not case sensitive. I need case sensitivity.
So I managed to create another formula which shows true if there is no match, however exact requires it to be an array formula which doesn't seem to work with conditional formatting.
So this works if it is entered in to a cell with ctrl+shift+enter, but doesn't work as a conditional rule.
{=ISERROR(MATCH(TRUE,EXACT(C5,D:D),0))}
Here is a simplified version of what I'm looking at for testing. That formula is true when there is no case match, but I can't enter it in conditional formatting with ctrl+shift+enter. If this worked as I want it to, the lower case "melon" would highlight red.
Is there a way to get this working, or is there an alternative method to do this?
If it matters, I'm using the latest version of excel in office 365.
Use a function that produces array processing without CSE. Examples are SUMPRODUCT or AGGREGATE (among others).
'to show TRUE for case-sensitive matches
=SIGN(AGGREGATE(15, 6, ROW($D$5:$D$9999)/EXACT($C5, $D$5:$D999), 1))
'to show TRUE on no case-sensitive match
=ISERROR(AGGREGATE(15, 6, ROW($D$5:$D$9999)/EXACT($C5, $D$5:$D999), 1))
The SIGN wrapper is unnecessary but for me it is a visual reminder that I'm looking for a boolean.
You cannot use dynamic ranges like D5:INDEX(D:D, MATCH("zzz", D:D)) in a CFR and you do not want to use full column references in AGGREGATE (or SUMPRODUCT) so I opted for $D$5:$D$9999.

Conditional Formatting entire worksheet with case sensitive text

I have an Excel worksheet that I would like to use conditional formatting on to change text color. The problem that I am having is that it uses genetics so I need formatting to be case sensitive. Ie:
dd=red
Dd=yellow
DD=green
Right now I am using conditional formatting > format cell that contains > specific text. That isn't case sensitive so anything with two d's in it, regardless of case, turns the color red. I tried to google and found a few things:
1) use "exact" which when I did this said it was incorrect. I tried same as above but used
=EXACT("dd")
instead of just dd. It tells me to use a valid formula.
2) version 2003, which is the only option I have at work, isn't case sensitive compatible - is this true and if so is it easy to figure out how to define that I want case sensitive in newer versions?
3) use a macro
Am I just SOL with my old version of Excel?
Select the option "use a formula" and enter
=EXACT(A1,"dd")
where A1 is the first cell in the area where you're applying your CF

Use formatted cell if the value is in certain bounds

I am having a grading scale and would like to map my grades to the grading scale.
I tried to use just VLOOKUP(), however, the formatting is not taken and also some bounds are breached.
Any recommendation, how to use the formatting in my resultCell?
You would use conditional formatting.
To get the result name to print, use this formula:
=INDEX($A$2:$A$6,MATCH($E2,$B$2:$B$6,1))
For the Number:
Reproduce these steps:
Change your table so the values aren't equal to each other, as in, the Perfect(Max) shouldn't be the same as the perfect-(Min).
Take the result cell, and go to Conditional Formatting.
Highlight Cell Rules > Between
Select the cells that contain the min and max for that particular color.
Select "with" Custom Format
Select the color you want for that result
Repeat for each color you want used.
For the "Perfect" Result:
Repeat the same as above, except use Highlight Cell Rules > Equal To Then select the appropriate values for each color, ie, "Perfect" for Dark Green, etc. Use the actual cell address.
You will want to leave the fourth parameter of the =VLOOKUP() formula as TRUE for an approximate match. This allows you to get "map/lookup" values in-between the ranges of numbers.
This should do the trick, just play with the cutoffs to get the behavior you desire:
Various adjustments that would normally be considered quite minor might make this question a lot easier to answer, but taking the details as they are (with Start assumed to be in C2, 3,4 assumed to be three and four tenths and the required output as shown in G3 and G4), in G3 and copied down to suit:
=IF(F3=0;"perfect";IFERROR(INDEX(B:B;MATCH(F3;C:C;0)-1);INDEX(B:B;MATCH(F3;C:C))))
Select ColumnG, HOME > Conditional Formatting – New Rule…, Format only cells that contain, Format only cells with::
Specific Text
containing
perfect
Format…, dark green fill, OK.
Repeat rules as below:
Where the order is important because “contains low” will find both low and low- so orange should be applied after red.
What might have made things easier is:
To have columns B and C switched over (ColumnD is not required) to allow use of VLOOKUP instead of INDEX/MATCH.
To change the break points (so that the START values are not the end of the previous range and part of that and hence the need to attempt an exact match before resorting to an inexact one).
To classify without relying on the - for differentiation (to avoid the ordering issue mentioned above).
To place perfect in B2, to avoid the equality issues mentioned in a comment (and I think not addressed in the accepted answer).

Resources