Matching Columns and Highlighting and sorting differences

allgonzo

New Member
Joined
Jul 25, 2010
Messages
32
I have five columns. The first column contains employee names that have helped the office for the last year. The other four columns contain data (numbers). This includes former employees and temporary employees. I need to compare the first column to a column that lists my current census (could be on the same sheet or in another sheet). Once the names are compared, I need to highlight the rows of the individuals who are not on the current census and move them to the bottom of the list. Currently I do this in about 5 different steps and a lot of time. Any help is appreciated.
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

mikerickson

MrExcel MVP
Joined
Jan 15, 2007
Messages
24,013
If your data is in columns A through E and your current list is in a named range, add a sixth column with the formula

=COUNTIF(current_list,A1)

Sorting (descending) on this column will move the inactive names to the bottom of your list.
 

allgonzo

New Member
Joined
Jul 25, 2010
Messages
32
Thanks for the reply. I currently use a countif formula. I was wondering if there was a macro that could do everything at once?
 

mikerickson

MrExcel MVP
Joined
Jan 15, 2007
Messages
24,013
You could record a macro, and the last thing you do before pressing Stop Recording is to delete the helper column.
 

Watch MrExcel Video

Forum statistics

Threads
1,132,679
Messages
5,654,713
Members
418,149
Latest member
tjanok

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