Pivot Column into "Actual" and "Budget" values

TheMacroNoob

Board Regular
Joined
Aug 5, 2022
Messages
52
Office Version
  1. 365
Platform
  1. Windows
Hello all,

See table for example data set. I have transformed 2 files, one "Actual", one "Budget", and they are appended. How do I unpivot the "Source.Name" column in a way where I have two columns, "Actual" and "Budget", their corresponding value for GL Code, GL Name, and Cost Center? I will provide example below the data.

Data:
Source.NameGL CodeGL NameCost CenterValue
Actual6010-0000Salaries40091955
Actual6010-0000Salaries400919610
Budget6010-0000Salaries400919520
Budget6010-0000Salaries400919625


Desired Result:
GL CodeGL NameCost CenterActualBudget
6010-0000Salaries4009195520
6010-0000Salaries40091961025


I appreciate any instruction you come up with!

Worst case it can be done in two queries, merged, adding custom columns to make sure there aren't nulls all over the place, but I am trying to avoid if possible.
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Nevermind... I thought I already tried the "Pivot Column" feature, but I was mistaken. I just needed to open advanced options and select "Don't Aggregate" from the dropdown menu.
 
Upvote 0
Solution

Forum statistics

Threads
1,223,214
Messages
6,170,774
Members
452,353
Latest member
strainu

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