I have two columns of values in excel I want to format.
If two Rows in Column A match, check column B to see if those two row's values match also. If they don't match, highlight the rows.
For example, the first columns first two rows values match so I want to check the second column to see if they match. They do not so both rows should be highlighted. The third and fourth match, and the second column for those rows also match, so these should not be highlighted.
Number Tool
227974 9285
227974 9219
229703 9219
229703 9219
Assuming your data is in the top left, select the data cells and create a conditional format with condition:
=OR(AND($A2=$A3,$B2<>$B3),AND($A1=$A2,$B1<>$B2))
And set it to highlight as you would like.
Related
In column C, there are duplicate values that I don't want. How do I go about filtering the rows by the condition - Show the rows where there are duplicate values in column C?
I would add a helper column at the end with =COUNTIF(C:C;C1) and copy it down behind every row with data. Then filter on >1.
Or you can create a pivottable and put column C in the values as a count.
Easiest way is to add conditional formatting for duplicates and then filter on colour - it doesn't involve changing your data set at all and is an easy visual cue as to where duplicates exist. However, similar to the answer above, this will filter out both the original and the duplicate record.
If you want one of the rows to show (i.e. 1 of each value in column C), then a new column with the COUNTIF formula applied to the range starting 1 cell below or above would work. So if the new column was "D", in cell "D2", you would use either;
Cell above:
= COUNTIF($C$1:$C1,$C2)
OR
Cell below:
= COUNTIF($C3:$C$9000,$C2)
Note: if you use the count from the cell below (i.e. to show the last row where that value is found), you will need to assign a "finish row" - I used 9000, but you could go to 1048576 if you want to include whole sheet.
You would then filter column D to only show 0s
These solutions assume you still want to keep the records, just hide them. If this is not the case, there are easy ways to delete duplicates.
I'm trying to apply conditional formatting to my data where I need to color the rows based on certain columns. If the current and previous rows have same data in 4 particular columns, I will color those rows. But I also need to apply this color to alternate rows.
So the result I need is like the format in the image below:
As in the sample image above, first two rows have same values in column Name1, Name2, Type_Name and Type_Code, they are colored. Then, the next row is skipped from coloring. And then the next row even if it does not have a matching row above or below, it will be colored. Then rows with Rita in Name1 are skipped.
So far I'm able to get to the rows with same values in the 4 columns and color the alternate rows, both the logics separately, but unable to apply the mix of both properly. Below are the logics applied so far.
This one, where the rows have same values in the 4 required columns, using the formula
=OR($H2&$I2&$J2&$K2 = $H1&$I1&$J1&$K1, $H2&$I2&$J2&$K2 = $H3&$I3&$J3&$K3)
And alternate rows colored with the formula
=MOD(ROW( ),2)=0
I would first add a helper column which separates the groups.
This is done by checking if the relevant columns of the row is the same as the row above. If it is, we simply take the max value of the column, if it is different, we increment the max value by 1. We can then apply the conditional formatting if this helper column is an odd value:
I have a spreadsheet with a couple hundred rows, and some of the cells contain the text "N/A". I'd like to delete the full row of any cell that has "N/A" in it.
My first thought was to use Find All and then once all the relevant cells are selected, I can do Ctrl - and select "entire rows". However this usually leaves a bunch of cells with "N/A". Why is this?
Insert a column (or use last available blank column).
Use equation IFERROR(SEARCH("N/A", A2),"No Match") where I am
assuming Column A has your strings that may contain N/A
Drop Equation down to used range
Filter your new helper column and remove No Match
Delete rows of visible cells
Output below. Any numeric value in Column B means a match of N/A was found.
I have 834,000+ rows of data in columns A-S. There are pairs of rows separated by a blank row. For each pair, I need to compare column S in both rows and if they both contain "Y", then I need both rows highlighted. If they don't match, then no action is taken. How can I set this up so that it skips the blank rows and highlights the pairs correctly?
Try this formula in cell T10 : =AND(S10="Y",OR(S10=S9,S10=S11)) then copy it up and down. If that shows TRUE for the rows you want to highlight .. you can now easily setup a conditional format for the range, based on Column T. ;)
I'm fairly new to Excel and so not very experienced, but I'm trying to get an entire row to highlight red based on 2 other cells, using conditional formatting. The requirements are for the corresponding M cell in the row to have the value 'N' and for the corresponding E cell to have a past date value '<*NOW'.
I've tried a formula based on an answer for multiple conditions:
=AND(M="(N)";E<*NOW)
A formula for formatting an entire row:
=INDIRECT("m"&ROW())="N",("e"&ROW())E<*NOW
And combining the two:
=AND=INDIRECT("m"&ROW())="N",=INDIRECT("e"&ROW())E<*NOW)
(ignore all the asterisks its the only way i could get the NOW to appear)
None of these are working, please help!
Assuming your data starts at row 2 then select all rows, e.g. 2 to 100 and then apply the condition for row 2, i.e. use this formula
=AND($M2="N",$E2<TODAY())
That will now apply to the whole range. The $ signs make it format the whole row