1st and Last name

outlawspeeder

Board Regular
Joined
Jan 17, 2009
Messages
225
Office Version
  1. 2019
I'm sorting data in excel and I have to do this to many parts of the excel doc. If someone could help me with getting the bellow I could then add repeat that for the rest of the tab I have to fill in. So I am only using the 1st and last name as an sample.

What I trying to do is have a table that uses can enter 1st names into (sheet1 A3:A13). The user would then press a button and the code would look at Sheet 2 column A and find the first name.

At this piont it would get the last name in Column B. It would then use the last name to find all the rows with the same last name and copy them to sheet 3.

I think it can be done with a loop or If statment but not sure how to go about it.

Thanks for any help.
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
As it goes down the first name gets Bob, does for the last name for Bob Jones and is none, it should go back to the first name column and finsh looking for Bob untill last line.

So if there is a Bob Jones and a Bob Davis both last name groups would be copied to the next tab.
 
Upvote 0

Forum statistics

Threads
1,214,808
Messages
6,121,684
Members
449,048
Latest member
81jamesacct

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