Combine Column Header with Row Header and Pull Corresponding Dollar Value

nannerb22

New Member
Joined
Jul 7, 2017
Messages
2
Hello all,

I tried searching for a thread that addresses this question, but I was not able to locate one. I may not have worded my search correctly.

I receive a hospital's accounting trial balance that has hospital department numbers and names in row 1 and 2 and account type numbers and names in column A and B.

What I want to do is the following:

1. Combine each department number with each account type number with a dash in the middle.
2. Combine each department name with each account type name with a dash in the middle.
3. Pull the balance where the department and account type intersect.

See below for a visual example that is likely easier to understand.

What I receive:
10203040
AdministrationSurgeryLaboratoryRadiology
6000Salaries200,000150,000100,00075,000
7000FICA Tax25,00015,00010,0007,500
8000Benefits10,0005,00002,000

<tbody>
</tbody>









The result I would like to get to:

Account NumberAccount NameAccount Balance
10-6000Administration - Salaries200,000
10-7000Administration - FICA Tax25,000
10-8000
Administration - Benefits10,000
20-6000Surgery - Salaries150,000
20-7000Surgery - FICA Tax15,000
20-8000Surgery - Benefits5,000
30-6000Laboratory - Salaries100,000
30-7000Laboratory - FICA Tax10,000
30-8000Laboratory - Benefits0
40-6000Radiology - Salaries75,000
40-7000Radiology - FICA Tax7,500
40-8000Radiology - Benefits2,000

<tbody>
</tbody>

I'm trying to find the least time consuming way to get to the end result above. I would be open to solutions using formulas, VBA (very little experience, but will work with this if there is a solution using VBA), or Power Query. Also please let me know if there is a current thread that addresses this question.

OS: Windows 7
Excel : Excel 2010 with Power Query Addin installed

Thank you.
Brennan<body id="cke_pastebin" style="position: absolute; top: 566px; width: 1px; height: 1px; overflow: hidden; left: -1000px;">
Surgery - Salaries

<tbody>
</tbody>
</body>
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

Forum statistics

Threads
1,215,200
Messages
6,123,611
Members
449,109
Latest member
Sebas8956

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