I have a worksheet:
I need type value into 2 columns: [Supervisor 1] and [Supervisor 2] by condition:
1. Value into [Supervisor 1] column and [Supervisor 2] column must different. If the value is the same so highlight red color (both of them)
Ex:
In D3 cell, I type "John" value. In E3 cell, I type "Susan" value -> No highlight red color
In D3 cell, I type "John" value. In E3 cell, I type "John" value -> Both of D3 and E3 cells highlight red color
In D4 cell, I type "John" value. In E9 cell, I type "John" value -> Both of D3 and E3 cells highlight red color
2. The highlight red color just occur in range on this day
Ex:
In D3 cell, I type "John" value. In E10 cell, I type "John" value -> No highlight red color
In D21 cell, I type "Mary" value. In E13 cell, I type "Mary" value -> No highlight red color
Please help me this problem
--------------------I updated my expect result--------------------
I have a image (my expect result)
In E5 cell, after I type "Louis" value -> highlight red color. Because value in E5 and D4 the same (Note: on this day)
In E7 cell, after I type "Nemo" value -> highlight red color. Because value in E7 and D7 the same (Note: on this day)
In D15 cell, after I type "Messi" value -> highlight red color. Because value in D15 and E12 the same (Note: on this day)
In D15 cell, after I type "Messi" value -> highlight red color. Because value in D15 and E12 the same (Note: on this day)
In D11 cell, after I type "Susan" value -> NOT highlight red color. Because value in D11 and D6 the same but different day exam (Note: on different day)
In E21 cell, after I type "Chen" value -> highlight red color. Because value in E21 and D21 the same (Note: on this day)
If you need to pick up any match between the two columns within the same day, and the day always takes 7 rows, try
=SUM(--ISNUMBER(MATCH($D3:$D9,$E3:$E9,0)))
The formula can be changed if my assumptions aren't correct.
EDIT
If you want to highlight the name in column E if it also appears in column D on the same date, it's just a COUNTIFS
=COUNTIFS(A:A,A3,D:D,E3)
EDIT 2
To highlight the second occurrence only of the name for the same date, you would need two formulae
=COUNTIFS($A$2:$A2,$A3,$D$2:$D2,D3)+COUNTIFS($A$2:$A2,$A3,$E$2:$E2,D3)
for D3:D23
and
=COUNTIFS($A$2:$A3,$A3,$D$2:$D3,E3)+COUNTIFS($A$2:$A2,$A3,$E$2:$E2,E3)
for E3:E23.
This isn't too hard to do... the key insight is that you can use a cell-relative formula within a conditional formatting rule. (You'll need two... one for each cell to check if it matches the other in the pair. If they match, then that triggrs the conditional format.)enter code here
I have your solution:
Select the whole range for Column D (looking the picture, I will assume its D3:D23.
In Ribbon, select Home > "Conditional Formatting" > New Rule.
Select Option: "Use a Formula to determine which cells to format".
In "Format values where this formula is true" add the following formula: =IF(D3<>0,IF(D3=E3,1,0))
Select the format you want for the cell, clicking in "Format", if D and E are the same and press "Ok".
Now do the same steps for Column E (selecting the whole range for column E), but instead add the following formula: =IF(E3<>0,IF(D3=E3,1,0))
This should definitely solve your issue. If there is a question, please let me know.
Related
Need solution: (Unable to find in group based on below example)
Format cell color based on drop down.
Example
If A1 Drop down value 'Shirt' then color A2, A5 and A6 as yellow.
If A1 Drop down value 'Tie' then color A3, A7 and A9 as green.
User has to fill the highlighted columns if they select the value as Shirt or Tie.
Two rules with formula:
First:
Applies To: =$A$2,$A$5:$A$6
Formula: =$A$1="Shirt"
Second:
Applies To: =$A$3,$A$7,$A$9
Formula: =$A$1="Tie"
Cell A1 (till A10) contains random date. I want B2 (till B10) to become red on the 3rd work day after A1. Also, if B is empty or NA then dont color B.
For example: if A1 = 18Oct, then B1 should become red on 23Oct. If A2 = 21Oct, then B2 should become red on 24Oct.
What code should I put in conditional formatting?
Highlight the relevant range in Column B, which is B1:B4 in the above example, enter the following formula as the formatting rule for conditional formatting:
=NETWORKDAYS($A1,$B1)=4
What I'm trying to do is condition the cells in column E to change colour depending on the value of column F.
i.e
If F3 minus E3 = <2000 cell turns red
If F3 minus E3 = <5000 cell turns orange
If F3 minus E3 = >5000 cell turns green
I want to condition the whole of column E with this formula
Select column E and click Conditional formatting --> new rule
Click "use formula to determine which cells to format"
and in the formula bar enter the below formula,
=AND(F1<>"",E1<>"",F1-E1<2000)
select the red fill color and click OK
Now do the same for other formatting types,
Orange:
=AND(F1<>"",E1<>"",F1-E1<5000,F1-E1>=2000)
Green:
=AND(F1<>"",E1<>"",F1-E1>=5000)
Is it possible to create a conditional statement to do the following without having to create the conditional format for each row?
For each row, if row column D cell is less than the value of row column A cell I want it to highlight red. If row column D cell is greater than the value of row column A cell, I want it to highlight green.
Example:
if D1 < A1 Highlight RED
if D1 > A1 Highlight GREEN
if D2 < A2 Highlight RED
if D2 > A2 Highlight Green
and so on and so forth....
Assuming you want Column A's cells to highlight the color, set up your conditional formatting like this:
Formula: =$D1>$A1 for Green, =$D1<$A1 for Red
Then, make sure the "Applies To" range is correct (this is where I personally usually mess up):
Applies to (for both): $A$1:$A$10
If you want the row to highlight, then the "Applies to" range is =$1:$10 or just =$A$1:$D$10.
How Can I Get First Cell Content ?
here is my sheet
A
1 Color
2 Red
3 Blue
4 Yellow
note : Color has filter
i want to make the cell B1 = first cell of column A - I try type in B1 =A2
but when i make filter (example i select blue) the cell B2 show nothing (i want B1 to show the filtered data on first column )
A Non-Volatile AND Non-Array entered option is to use a helper column:
In B2 Enter =SUBTOTAL(3,A2) and drag it down. This will mark every row with a 0 or a 1 depending on if it is visible or not.
Then in B1 you can simply enter:
=INDEX(A2:A4,MATCH(1,B2:B4,0))
The above will search the B column for the first 1 (stands for visible), and return the value of the cell in column A of that row.
In B1 enter the array formula:
=INDEX(A2:A100,MATCH(1,SUBTOTAL(3,OFFSET(A2:A100,ROW(A2:A100)-ROW($A$2),,1)),0))
Array formula must be entered with CNTRL-SHFT-ENTER rather than just the ENTER key