How to Format / Highlight cells that do not contain any number - excel

For our address label printer we use an Excel file.
Unfortunately in Holland many people forget to add their house number and I'm trying to fill them with red so our team knows they need to contact them to get their house number.
Here is an example:
https://gyazo.com/89a0f89542b2256efdda45c7dec00ce4
As you see in cell D9. somebody forgot to enter a house number, so that cell should be filled red.
I googled a lot, but could not find the correct conditional formatting answer for it.

As mentioned by Solar Mike, this is fairly easy indeed, you just need to create a conditional formatting rule, based on the =ISBLANK() function, as shown here:
(The G3 in the formula refers to the top left cell.)

To find if string contains any number you can use this formula:
=COUNT(FIND({0,1,2,3,4,5,6,7,8,9},D1))>0
It returns TRUE if there is a number and FALSE otherwise.
Since you can't use arrays in conditional formatting you have to use this formula in "helper column", then you can use output (TRUE and FALSE) in conditional formatting.

Related

how do I compare each row of two different columns and highlight the highest value (not formula) in each row?

I have two columns to compare. All cell values come from the ROUNDUP function. =ROUNDUP(C6/D12,0) etc.
I want the larger, or equal, of the two in each row to be green and the smaller red. Using the formula, it does not work as expected. If I do the same with numbers typed, not the formula, it works. It appears the formatting applies to the formula and not the value.
That is the first half of the problem. I also want to autofill/paint the conditional formatting to numerous cells, but it always compares to the top left cell, rather than the two cells on the same row.
If I use the color scales formatting it works, but I do not want the scales, just red/green.
It seems hard to believe that what I want to do is not possible. Can someone please help me with this. Thanks in advance.
In conditional formatting, under 'use a formula to determine which cells to format', you need to enter
=A2=MAX($A2,$B2)
to highlight the larger cell and (as a separate rule)
=A2=MIN($A2,$B2)
to highlight the smaller cell.
Note that in the case where both cells have the same value, they will both be either coloured red or green depending on the precedence of the rules. If the 'green' rule comes first,
it will look like this:
Conditional formatting is almost its own little science within Excel. It may be more useful to find youtube tutorials on the topic than depend on a text explanation here. But the central theme is this.
You will use location locking (the dollar sign or F4) in front of the letters so that any cell to which the format is applied knows you specifically mean columns E and F, for instance.
Example: Assume your first row goes from A5 to M5, and the condition values are in E5 and F5.
I find it easiest to format one row with the rules I want, test them, and then use the format painter or copy -> paste format along with careful use of $ locking.
Drag over and select the entire row of cells A5:M5
Conditional Formatting -> New Rule -> Use a formula to determine which cells to format
In the formula field enter =$E5>$F5. Excel gets weird and often inserts double quotes. If you save the rule and go back in, it may say ="$E5>$F5" and if so delete the double quotes.
Click Format and create the cell format you want.
With A5:M5 still selected, add another rule and format for ="$E5<$F5"
The $ sign works the same way as it does in a formula. All of the columns get their format based on columns E and F, but all of the rows base their formula on the E and F values in that same row.

Excel Conditional Formatting Nest AND and OR

I have a rather quick hopefully not too complicated question for you guys. I'm trying to use conditional formatting where I want a cell to turn red if the following statements are False or If the conditions are not met.
I'm using the Formula for Conditional formatting where you have to input it manually. The real problem I'm having is using a nested AND and OR.
Here's the formula I have for conditional formatting (one thing to note that, maybe I could be wrong, but my 2013 Excel is treating OR as an AND and vice versa. I've tested it many times and this is the case, so the formula you see below treats OR and AND as I mentioned. In short, pretend that AND is OR and OR is AND. But if it confuses you, just go with the correct convention:
=AND(OR(SUM(A1:A5)=0,SUM(B2:B5)=0),OR(SUM(C1:C5)=0,SUM(D1:D5)=0),SUM(E1:E5)=0)
So basically, say I have cell 'A7'. I want 'A7' to be red until there's a number in
Both A1:A5 and B2:B5 or:
E1:E5 or;
Both C1:C5 and D1:D5 -----> here's where it doesn't work.
Points 1 and 2 above work as desired, but when I add the second 'OR' it doesn't work. Remember, for some reason my Excel COnditional Formatting treats OR like and AND and vice versa so when I say:
OR(SUM(A1:A5)=0,SUM(B1:B5)=0)
It treats it like an AND where both conditions must be true, therefore, I've been following this convention.
So basically how do I have more that one OR statements within AND as shown above.
I hope I made the question clear. Appreciate your guys help!! If you can also tell me a general rule on how nested And OR works, that would be helpful.
Thank you!
Select A7, fill it with red colour (standard fill), clear any existing CF from 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::
=OR(COUNT(E1:E5),AND(COUNT(A1:A5),COUNT(B2:B5)),AND(COUNT(C1:C5),COUNT(D1:D5)))
Format..., select No Colour fill, OK, OK.
Try this =IF(OR(AND((SUM(A1:A5)>0),(SUM(B2:B5)>0)),SUM(E1:E5)>0,AND((SUM(C1:C5)>0),(SUM(D2:D5)>0)))=FALSE,TRUE,FALSE)
I put this into a cell first and used the Evaluate Formula before pasting it into the Conditional rule.
Set the text to be red if this is true.

Is changing the color of a cell based on nested conditionals possible?

I have been trying to change the color of certain cells on my WS that fall outside of an acceptable range. The statement I've been trying to use is,
IF(OR('cell'>1.3,'cell'<2.5),'turn red','do nothing')
In english, "If a cell is less than 1.3 or greater than 2.5 turn red, else do nothing." I cannot find a resource that guides me to how I can get the cells to change colors. I also have been unsuccessful in creating a statement in the Conditional Formatting tab that satisfies my goal. I feel this should be simple, but for some reason cannot figure it out. Does anyone know if this is possible, and if so how to do it?
EDIT: Also, I have different ranges based on another cell on the spreadsheet. I need this also taken into consideration
Select the columns that you want to format
Click Conditional format --> new rule
Select "Use a formula to determine which cells to format"
In the formula bar enter the formula =AND(A1>1.3,A1<2.5)
Choose the fill color as red and press OK
am confused with your formula and your english version. If its the other way, then use the formula =OR(A1<1.3,A1>2.5)

Excel Formula If Cell Contains String

I'm currently working in excel, and I'm trying to figure out a way to find if multiple cells contain the string value of another cell, and if it does highlight the cell where the row and column meet up. I created an example of what I want, only it will be on a much larger scale.
I've tried using: =ISNUMBER(SEARCH(substring,text)) but I'm not quite sure how to use it the way I want to.
Any help will be appreciated!
Your approach is correct, we can use the fact that conditional formatting is applied like dragging a formula, adapting relative references.
Create a conditional formatting formula rule:
=ISNUMBER(SEARCH(B$1,$A2))
Applied to B2:D7
Your formula will work nicely; what you'll want to do is put that formula into all the cells you want to highlight, so you get FALSE and TRUE in every cell.
You'll then use two Conditional Formatting rules. The first will look for Cell Value = TRUE, and will set cell background and font colour to yellow. The second will look for Cell Value = FALSE, and will set cell background to No Colour and Font to White.
This will reproduce the result you're looking for.
Edited to add:
It is possible to do this using just Conditional Formatting too, but it's a little more fiddly. If you want to try it, you can do this:
Highlight your range, and take note of which cell is Active - that's the cell within your highlighted range that is still white. It's also the one whose address is shown in the Name box in the upper left. For the sake of this answer, we'll assume that's B2
Create a new Conditional Formatting rule. Choose "Use a formula to determine which cells to format".
Use the formula =ISNUMBER(SEARCH(B$1,$A2). Set the format to colour just the cell background.
Note where the $ appears in the formula above - you want to leave the row number anchored in the first part, and the column letter anchored in the second part.
This takes advantage of the fact that Conditional Formatting is able to use absolute, relative, and mixed references to find which cells to format. It's also a tidier solution, but it can be harder to maintain if the sheet is ever repurposed or modified.

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