Any MS Excel gurus on here?

DanteEXT

Well-Known Member
Messages
4,043
Reaction score
2,395
I have a basic understanding of excel but I don't use much more than the filter function.

I've got a spreadsheet #1 with, oh lets say, part numbers in column A and their corresponding part names in column B numbering in the thousands.

I've been provided another spreadsheet #2 with a list of part numbers but no names. This list is only a small subset of the total list of parts.

What I need to do is match the part numbers between the 2 spreadsheets and pull the name of the matching part in spreadsheet #1 and fill column B in spreadsheet #2 with that name.

Is this possible?
 

YosemiteSam

Unfriendly and Aloof!
Messages
45,858
Reaction score
22,194
CowboysZone LOYAL Fan
Sounds like you've normalized your spreadsheets and using references between the two.

It's easy enough to do in a database using joins, but I'm pretty sure Excel doesn't "use joins". It would have to be some type of formula or VB script.
 

YosemiteSam

Unfriendly and Aloof!
Messages
45,858
Reaction score
22,194
CowboysZone LOYAL Fan
Excel does join, if that's what the OP is, in fact looking to do:

http://www.contextures.com/xlCombine01.html

Not exactly the type of join I was talking about. (you can use subquery too, if you aren't presenting data that doesn't exist in the original table)

The type of join I'm talking about is when you have two database tables each with different information, but also having at least one field in each that match for reference purposes.

For instances, customer records in a single table that has their customer ID, name, address, phone number etc. Then you have a second table that shows all their order headers. (ie, a order table with date of order, order ID, order total, etc)

Then you can create a subquery that will list all orders for said customer based on the customer's name.

You select customerid from the customer table to search for the customer's name and use the customer number that is returned to reference all orders in the order table by using the customer's number.

This is a subquery example rather than using one of the many actual JOIN syntax.

SELECT (*) FROM order_table WHERE customerid = (SELECT customerid FROM customer_table WHERE customer_name = 'Burger Hut');

This would returns all orders from a company named Burger Hut.

To be clear, subselects use data searched for in one table to search for data in another table. A join does similar, except the join allows you to present data from both tables in the tuples returned.

From the above, a join would allow you to show Burger Hut and the order ID and total in the same returned tuples.
 

Stash

Staff member
Messages
78,860
Reaction score
103,643
CowboysZone ULTIMATE Fan
Not exactly the type of join I was talking about. (you can use subquery too, if you aren't presenting data that doesn't exist in the original table)

The type of join I'm talking about is when you have two database tables each with different information, but also having at least one field in each that match for reference purposes.

For instances, customer records in a single table that has their customer ID, name, address, phone number etc. Then you have a second table that shows all their order headers. (ie, a order table with date of order, order ID, order total, etc)

Then you can create a join query that will list all orders for said customer based on the customer's name.

You select customer name from table one and use the customer number that is returned to reference all orders in the order table by using the customer's number.

This is a subquery example rather than using one of the many actual JOIN syntax.

SELECT (*) FROM order_table WHERE customerid = (SELECT customerid FROM customer_table WHERE customer_name = 'Burger Hut');

This would returns all orders from a company named Burger Hut.

To be clear, subselects use data searched for in one table to search for data in another table. A join does similar, except the join allows you to present data from both tables in the tuples returned.

From the above, a join would allow you to show Burger Hut and the order ID and total in the same returned tuples.

Gotcha. I misunderstood your original post.
 

ABQCOWBOY

Regular Joe....
Messages
58,929
Reaction score
27,716
You need to go out and find a young girl (get your mind out of the gutter all ya'll) in HS. Those girls have been taught how to use MSEx like no others. I mean, don't get me wrong, they tried to teach the boys too, but they just don't pick it up, I guess, like the girls do. Two daughters and two Sons myself. When I had something I needed help with (not easy stuff either) the boys would just get a glassed over look in there eyes. The girls wouldn't even look up from whatever they were doing, at me. They would just jump on my Laptop and figure it out. Was sad actually. LOL........
 

DanteEXT

Well-Known Member
Messages
4,043
Reaction score
2,395
I did find a way to get the information but not the way I was hoping. Ended up sorting each spreadsheet alphabetically, copying the column list from the second document and pasted below the column from the first. From there I was able to use excel to highlight the duplicate values then filter on that color. That left me the list of names I needed so another copy and paste back to the second spreadsheet and I was done.
 
Top