Merging Workbooks

LOUBOYBEAR

New Member
Joined
Feb 10, 2011
Messages
25
Hi
I have 2 data lists:
1 for staff (employee numbers)
1 for jobs (position numbers)

I need to basically merge the two sheets together.
I have tried to do this with a vlookup looking at the POSITION number and finding the person with that position number in the staff list; but if more than one person has the same position number it only returns the first match.
I have also tried to do this by using the EMPLOYEE number as the lookup, which works, except I miss out on reporting on employee numbers where there is no staff member (ie vacant position).

I need to create a single w/s from the 2 reports bringing in all of the positions, putting the staff members name next to it when its occupied and "vacant" when it vacant.
Any suggestions?
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Is it something like this:

Employee Table:
Excel Workbook
ABC
1Employee IDEmployeePosition #
21JoAccoutning 1
32PhilAccoutning 3
43SueFinance 1
54HalFinance 3
65Tom WHuman Resources
76RalOperations 2
87RalfOperations 3
98GhorOperations 4
109PamAdmin 1
1110FinAdmin 3
1211SiouxAccoutning 1
1312ChinAccoutning 3
1413JuneFinance 1
1514SheliadawnFinance 3
1615Sue RHuman Resources
1716LimOperations 2
1817DitherAdmin 1
1918TomAccoutning 3
2019GigiOperations 2
Sheet1
Excel 2010

Position table with formulas in green:
Excel Workbook
EFGHIJ
1Position #CountEmployeeEmployeeEmployeeEmployee
2Accoutning 12JoSioux..
3Accoutning 20....
4Accoutning 33PhilChinTom.
5Finance 12SueJune..
6Finance 20....
7Finance 32HalSheliadawn..
8Human Resources2Tom WSue R..
9Operations 10....
10Operations 23RalLimGigi.
11Operations 31Ralf...
12Operations 41Ghor...
13Operations 50....
14Admin 12PamDither..
15Admin 20....
16Admin 31Fin...
Sheet1
Excel 2010

Cell F2 and copy down:
Excel Workbook
F
22
...
Cell Formulas
RangeFormula
F2=COUNTIF($C$2:$C$20,E2)


Cell G2 and copy through range G2:J16:
Excel Workbook
G
2Jo
Sheet1
Excel 2010
#VALUE!
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
 
Upvote 0
Hi Mike, thanks for your reply.
What I need to create is a single row for each position number which contains all of the info about the position, and then if the position is occupied all of the information about the person occupying the position. If 2 people occupy the same position, obvioulsy the position details are the same, but their personal information is different.

The 2 reports where the position and employee information is picked up from are able to be changed if needed, but the linking field is obvioulsy the position number.

I am sorry but I not sure how to paste a picture and I am at work an unable to download anything onto the work computer. I am happy to send the s/s if it helps.
thanks again, I appreciate your time.

Sam Naughtin
 
Upvote 0
I do not understand what you are trying to do. I did not understand in your first post and I just tried to make a guess at what you wanted. Maybe you could post a sample data set of how the tables look before and how they should look after? Give at least one example and what the expected result should be.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
 
Upvote 0

Forum statistics

Threads
1,224,613
Messages
6,179,904
Members
452,948
Latest member
Dupuhini

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