IS there a do not match function - excel

I am trying to do 2 functions. The first is to match all the values (text) from 1 range with another and return the values that match. I would also like a second formula that returns the values that do not match. The 2 lists may not be in the same order nor can they be as they are ranked.
=IFERROR(INDEX($L$4:$L$23,MATCH($B15,$L$4:$L$23,0)),$L15&" Different")
Could anyone suggest an answer?
Thank you in advance

There is no native function of the kind I think you require.
With two unsorted ranges, say B4:B25 and L4:L25, one can identify matches and non-matches with Conditional Formatting and then perhaps might choose to filter by colour to extract matches or non-matches.
Select both ranges and (standard) fill red. Select B4:B25 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$4:L$25,B4)
Format..., select green (suggestion) fill, OK, OK.
Then select L4:L25 and repeat CF with:
=COUNTIF(B$4:B$25,L4)

I think that IFNA(INDEX($L$4:$L$23,MATCH($B15,$L$4:$L$23,0)), "NO MATCH") would help you solve this.

Related

Excel Conditional Format by Formula containing Cell(Address) in more than one cell

I have a list of cell addresses (B1:B100) in one sheet, which refer to a range (A1:Z26, for example) on another sheet.
I have been trying to link these through conditional formatting (say, to light up red). By formula, I can have the following work...
=cell("address",a1)=B1 ; this makes the cell in the range refered to in B1 light up red.
But when I try to apply this to the whole list, as in =cell("address",a1)=B1:B100 it does not work...
Can anybody help me find a way forward here?
the issue illustrated
Slightly modifying your original formula, you could try:
=MATCH(CELL("address",A1),Sheet2!$B:$B,0)
I suggest you select A1:Z26, clear any existing CF from it, HOME > Styles - Conditional Formatting, New Rule..., Use a formula to determine which cells to format and Format values where this formula is true::
=MATCH(ADDRESS(ROW(),COLUMN(),4),another!$B$1:$B$100,0)
Format..., select red fill, OK, OK.
References in the B column should be relative format.

Error Checking in Excel

I've got a workbook, that i use for fleet allocations, but i'm not sure how to do error checking in excel, and was wondering if anyone could point me in the right direction. When i allocate the vehicles to a duty, it uses vlookup to bring the driver name into the sheet. but what im unsure of how to do is, i have 54 duties, and it would be easy to miss one, so is there a way i can make it show me which duties are left to allocate ? please see screenshot...
Excel Worksheet Screenshot
For a layout as shown:
Select ColumnA, 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::
=AND(A1<>"",COUNTIF(C:E,A1)=0)
Format..., select formatting of choice (I chose the same fill as for the headers) OK, OK.
Well, had a look at your sheet... But I put this together as it is simple and you may be able to include it where you can...
Tha match() function looks for the duty in cell A2 and if it finds it in the list in column I then it returns its position number. If not found the iferror() returns "Not Allocated"...
The formula in cell B2 is:
IFERROR(MATCH(A2,J$2:J$10,0),"Not Allocated")

How can I colour a cell in excel based on the values in the cell next to it?

I've looked in to conditional formatting, but it doesn't manage relative references at all.
what I would like to write is something like
If ( the column number of this cell is more than the value in the first cell of this row)
colour it blue
end
It seems something really trivial, but writing something like:
=IF($C$3+4<=COLUMN();COLUMN()-4<=$D$3)
always returns true (I guess ecause it takes COLUMN as a fixed number, say the value it gets the frist time it calls it) and so all cells are blue.
that function returns the right value when evaluated inside the function field, but does not work for conditional formatting.
What can I do?
Assuming you want something like this:
Select Columns A:H and HOME > Styles - Conditional Formatting, New Rule..., Use a formula to determine which cells to format and Format values where this formula is true::
=COLUMN()>$A1
Format..., select choice of formatting, OK, OK.
You can do this with the normal conditional formula itself. Perform the following steps.
Click on a cell, the first cell that you wanted to color. Say it is C3
Now the default cell becomes your cell C3.
Click on Conditional formatting options, in that, select "Manage Rules"
In Conditional formatting rule manage window, click on New Rule button
In the new formatting Rule window. select Use a formula to determine which cells to format
Enter =(COLUMN(C3) > $A3) in the Format values where this formula is true edit box
Select the required color and click ok
Now copy this cells to all other cells where you want to do the conditional formatting.
Here the step 1 and 2 are critical to ensure that it is relative.
Quite hard to understand what you want without having more informations. Be that as it may, note that
=IF($C$3+4<=COLUMN();COLUMN()-4<=$D$3)
Means
if $C$3+4<=COLUMN() return COLUMN()-4<=$D$3 otherwise return FALSE
If it always returns TRUE it is because the tested cells are between the $C$3+4th and the $D$3+4th columns AND that $C$3 - $D$3 is a positive number which is sifficiently large for not beeing exceeded by the column number of the cells you test.

conditional formatting entire row if cell contains text

I have an excel sheet where I'm trying to use conditional formatting but it doesn't seem to work as I would like it to.
It seems as though any formula won't work as I don't want the cell to match TBC, but contain it.
In short, I am looking for this:
If D2 Contains "TBC" then highlight the whole row
I've tried around 10 suggestions through Google and also Stack Overflow but it seems as thou
Note: Each cell will have different values, i.e. D2 has "1 screenshot TBC" and D3 has "5 screenshots TBC". As they will all have different values but all contain the abbreviation "TBC" I am trying to search for that word.
Any help or advice that could be offered will be greatly appreciated.
Thank you in advance for your time! :)
Amandip
Select your entire sheet and HOME > Styles - Conditional Formatting, New Rule..., Use a formula to determine which cells to format and Format values where this formula is true::
=FIND("TBC",$D1)
Format..., select colour Fill (highlight) of your choice, OK, OK.
Change FIND to SEARCH if you want this case insensitive.
This will trigger for the likes of ATBCX.

Format according to multiple conditions

I have the following conditional formats, and I am wondering if it is possible to join them together in one, so I don't need to add them all separately:
IF($A11&$D11=$W$14;AND($K11>$X$14;$K11<$Y$14))
IF($A11&$D11=$W$15;AND($K11>$X$15;$K11<$Y$15))
IF($A11&$D11=$W$16;AND($K11>$X$16;$K11<$Y$16))
IF($A11&$D11=$W$17;AND($K11>$X$17;$K11<$Y$17))
IF($A11&$D11=$W$18;AND($K11>$X$18;$K11<$Y$18))
IF($A11&$D11=$W$19;AND($K11>$X$19;$K11<$Y$19))
IF($A11&$D11=$W$20;AND($K11>$X$20;$K11<$Y$20))
IF($A11&$D11=$W$21;AND($K11>$X$21;$K11<$Y$21))
IF($A11&$D11=$W$22;AND($K11>$X$22;$K11<$Y$22))
IF($A11&$D11=$W$23;AND($K11>$X$23;$K11<$Y$23))
IF($A11&$D11=$W$24;AND($K11>$X$24;$K11<$Y$24))
IF($A11&$D11=$W$25;AND($K11>$X$25;$K11<$Y$25))
IF($A11&$D11=$W$26;AND($K11>$X$26;$K11<$Y$26))
IF($A11&$D11=$W$27;AND($K11>$X$27;$K11<$Y$27))
IF($A11&$D11=$W$28;AND($K11>$X$28;$K11<$Y$28))
IF($A11&$D11=$W$29;AND($K11>$X$29;$K11<$Y$29))
IF($A11&$D11=$W$30;AND($K11>$X$30;$K11<$Y$30))
IF($A11&$D11=$W$31;AND($K11>$X$31;$K11<$Y$31))
IF($A11&$D11=$W$32;AND($K11>$X$32;$K11<$Y$32))
IF($A11&$D11=$W$33;AND($K11>$X$33;$K11<$Y$33))
Green fill to be applied to $K$11:$K$344 within a Table:
If this can be done easily in VBA, that could do as well.
Please select K11:K344 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(K11>=VLOOKUP(A11&D11,W$14:Y$344,2,0),K11<=VLOOKUP(A11&D11,W$14:Y$344,3,0))
Format..., select green, OK, OK.
You can maybe use COUNTIFS:
=COUNTIFS($U$11:$U$33,A11,$V$11:$V$33,D11,$X$11:$X$33,"<"&K11,$Y$11:$Y$33,">"&K11)
The above does not need the concatenated Region and Site Type (thus more criteria can be added as needed), but if you already have it, you can shorten it a little bit:
=COUNTIFS($W$11:$W$33,A11&D11,$X$11:$X$33,"<"&K11,$Y$11:$Y$33,">"&K11)
The set up of the conditional formatting remains the same.
COUNTIFS will return a number above 0 (interpreted as true) if there any matches to the Region, Site Type, lower and upper bounds, otherwise will return 0.

Resources