Formula to find data based on two critera

frateg8r

Board Regular
Joined
Mar 2, 2005
Messages
221
Office Version
  1. 365
Platform
  1. Windows
I have data from an SQL table that unfortunately exported in two parts - one being the primary name information, and the second being all the rest of the info. So, I need to match these up. On spreadsheet 1, I have the entity name and a corresponding identifier number. The second sheet has first the identifier number, then a second identified containing the relevant record (i.e. 2 = street name, 4 = city) and corresponding data.

I can use an index / match formula to pull data with one identifier (i.e. if it was just the entity identifier number), but not two levels. Can anyone help with that?

ITEM ID CHURCH NAME ADDRESS CITY ST ZIP
1 Greater Mount Olive AME Church #REF!
2 Allen Chapel African Methodist Epis
3 St Patricks Anglican Catholic Churc

The above represents the worksheet I'm trying to pull the data into; so I need to look to the second worksheet and pull address / city / st / zip etc for item ID 1:
ITEM ID
1 1 1212 N. Tropical Trail
1 2 32953
1 3 Merritt Island
1 5 FL
1 7 NOT@EMAIL.COM
1 10 321-459-0213
1 6 field_country_opt_1
1 8 Home Page
1 9
1 11
1 13
2 6 field_country_opt_1
2 1 2416 Lipscomb St
2 3 Melbourne
2 5 FL
2 2 32901
2 7 NO@EMAIL.COM
2 10 321-724-1557

As you should be able to see, for each ITEM ID (church), there are then various fields (such as 10 for phone) which I need to pull into the record.

Appreciate the help.

Bob
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
If the item id for sheet 1 matchs the information for the item ID on sheet 2 then possibly copy/paste them into 1 sheet and sort smallest to largest on the item ID.

Just a thought really and something to try
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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