Finding fields that are different..

ckroon

Board Regular
Joined
Nov 9, 2005
Messages
60
Sorry for thecrap title but my brain is fried! :)

I have a sreadsheet that has 8 thousand some records.
Set up is like this:

GroupID firstname lastname address parentfirst parentlast

I need to find the records where the parentlast does not equal the student last.

Any ideas?
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
One way is to use a helper column.

Assuming parentlast is in Col F, and "student last" is actually lastname, in Col C, then put this in some other spare column . . .
Code:
=if(c1=f1,"Match","No Match")
and copy down as far as required.

Then use Data, Filter to select all the "No Match" entries.
 
Upvote 0
Assuming
- "student last" is the same as "lastname"
- your fields are in A:F
- your header row is row 1
- your data starts in row 2

In G1 enter T/F.

In cell G2 enter and copy down
=F2<>C2

This will result in TRUE or FALSE in column G

Select the entire range from A1:Gx and from the worksheet menu click Data > Filter > AutoFilter. In the drop-down of cell G1 select TRUE and click OK.
 
Upvote 0
assuming lastname is in column C and parentlast in column F; highlight column F and from the menu select FORMAT > CONDITIONAL FORMATTING, from the popup select

Cell Value is + not equal to + =C1
and click on format button - select the formatting you'd like if the names dont match (ie: select yellow under the "pattern" tab)
 
Upvote 0
Just for fun, here's a code approach
Code:
Sub IDDiff()
Dim cl As Range
For Each cl In Range("$F$2:$F" & Range("$F$65536").End(xlUp).Row)
If cl <> Cells(cl.Row, 3) Then Range(Cells(cl.Row, 1), Cells(cl.Row, 6)).Interior.ColorIndex = 6
Next cl
End Sub

lenze
 
Upvote 0

Forum statistics

Threads
1,213,494
Messages
6,113,986
Members
448,538
Latest member
alex78

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top