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?
 

Some videos you may like

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number

Gerald Higgins

Well-known Member
Joined
Mar 26, 2007
Messages
9,115
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.
 

Tom Urtis

MrExcel MVP
Joined
Feb 10, 2002
Messages
11,224
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.
 

iggydarsa

Well-known Member
Joined
Jun 28, 2005
Messages
1,647
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)
 

lenze

Legend
Joined
Feb 18, 2002
Messages
13,690
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
 

Watch MrExcel Video

Forum statistics

Threads
1,122,371
Messages
5,595,782
Members
414,020
Latest member
Meghdad

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
Top