troubleshooting Question

# Combine random lengths of rows from one spreadsheet and apply to several different rows to another spreadsheet

Microsoft Excel
I have a two large spreadsheet that needs to be combined from one line to many lines.
On spreadsheet A, one line of data applies to one ID match. However the ID match has several subsets of data that also needs to apply on Spreadsheet B. Below is an example.

*Lease #               Tract #         Well Xref
L00029807025      1              315735001
L00029807025      1              315733000
L00029807025      1              315733002
L00029807027      1              315734001
L00029807027      1              315734002
L00029807028      1              315735000
L00029807028      1              315735001

*Lease #                Tract #
L00029807025      1
L00029807025      2
L00029807025      1
L00029807025      2
L00029807026      1
L00029807026      2
L00029807027      1
L00029807027      2
L00029807028      1
L00029807028      2
L00029807029      1
L00029807029      2
L00029807029      3

How the outcome should look like:

*Lease #                Tract #      WELL XREF
L00029807025      1                315735001
L00029807025      2                315735001
L00029807025      1                315733000
L00029807025      2                315733000
L00029807025      1                315733002
L00029807025      2                315733002
L00029807027      1                315734001
L00029807027      2                315734001
L00029807027      1                315734002
L00029807027      2                315734002
L00029807028      1                315735000
L00029807028      2                315735000
L00029807028      1                315735001
L00029807028      2                315735001

Points to remember:
*Not every value on spreadsheet B will be used
*The most important thing is that the lease and tract combo is hit on every line with the data. For example if lease Z has 3 tracts and is a match on spreadsheet A, all three tracts will have the same data line on the new spreadsheet.

I have the file example attached.

Thank you!
WELL-xref-example.xlsm
###### Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.