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

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
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,224,813
Messages
6,181,117
Members
453,021
Latest member
Justyna P

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