Excel Help With Line Items!

Stuck on this one.

Let's say you have three years of P&Ls (or BS) for a company and want to consolidate onto one sheet for modeling purposes. Lookup formulas are my native language, but I can't configure a way to consolidate line items if they're changing year-to-year.

For example, a simple line item scenario where items may be added/subtracted:

In year 1:

401K
Legal Fees
X Program Expense
Total Expenses

In year 2:

Legal Fees
X Program Expense
Total Expenses

In year 3:

401K
Legal Fees
X Program Expense
Interest expense
WSO Payment
Total Expenses

How can I, either via formula or advanced sort for unique values somehow generate a unique list with the items in their appropriate spot, like below- with ALL values:

401K
Legal Fees
X Program Expense
Interest Expense
WSO Payment
Total Expenses

If I put all of the values in one column sort for unique it gatheres unique at the bottom...requiring manual placement.

Any ideas?!

6 Comments
 

How are your VBA skills?

But to get this straight... I'm going to kind of exaggerate a little to make sure I get what you're trying do.

Year 1 X expense - $123 Y Expense - $456

Year 2 A Expense - $214 B Expense - $876

Year 3 Q Expense - $654 A Expense - $123 Y Expense - $142

And you want to turn it into a consolidated over the years so it would look like this....

A Expense - $337 B Expense - $876 Q Expense - $654 X Expense - $123 Y Expense - $598

make it hard to spot the general by working like a soldier
 

If you knew VBA it would be easiest I'd imagine. Maybe post something on one of the coding forums. Whenever I've had an issue someone would help me out in a day or two. Sometimes writing a whole macro for me even.

I'll try and figure something out not using VBA. I haven't coded in a while so it'll probably take me longer to figure it out that anyways.

make it hard to spot the general by working like a soldier
 

Dolorum velit quasi eum veritatis. Qui ducimus consequatur omnis corrupti. Eos voluptatum occaecati repudiandae. Hic sequi neque architecto assumenda sed facilis dolores.

Sint quidem perspiciatis iure architecto eaque. Qui explicabo impedit rerum est quia incidunt quas. Natus sed nihil ut libero sint quia.

Facilis molestias omnis id reiciendis impedit. Occaecati qui totam voluptate placeat provident. Rerum dolores quos quos enim dolore. Accusantium qui aspernatur quo id dicta ut libero.

A voluptatem eius sed sit alias blanditiis. Est natus cupiditate autem repellendus. Veniam vitae consequuntur quo.

Career Advancement Opportunities

June 2026 Investment Banking

  • Evercore 01 99.4%
  • Moelis & Company 01 98.9%
  • JPMorgan 01 98.3%
  • Guggenheim Partners 01 97.7%
  • Morgan Stanley 07 97.1%

Overall Employee Satisfaction

June 2026 Investment Banking

  • Moelis & Company No 99.4%
  • Morgan Stanley 02 98.8%
  • Evercore 01 98.3%
  • BMO Capital Markets 12 97.7%
  • Banco Santander 01 97.1%

Professional Growth Opportunities

June 2026 Investment Banking

  • Evercore 01 99.4%
  • Moelis & Company 01 98.8%
  • Morgan Stanley 05 98.3%
  • JPMorgan No 97.7%
  • BMO Capital Markets 12 97.1%

Total Avg Compensation

June 2026 Investment Banking

  • Vice President (14) $434
  • Associates (44) $258
  • 3rd+ Year Analyst (8) $210
  • 2nd Year Analyst (22) $179
  • Intern/Summer Associate (13) $156
  • 1st Year Analyst (78) $151
  • Intern/Summer Analyst (73) $101
notes
16 IB Interviews Notes

“... there’s no excuse to not take advantage of the resources out there available to you. Best value for your $ are the...”

Leaderboard

1
redever's picture
redever
99.2
2
Secyh62's picture
Secyh62
99.0
3
BankonBanking's picture
BankonBanking
99.0
4
kanon's picture
kanon
99.0
5
GameTheory's picture
GameTheory
98.9
6
CompBanker's picture
CompBanker
98.9
7
DrApeman's picture
DrApeman
98.9
8
dosk17's picture
dosk17
98.9
9
Betsy Massar's picture
Betsy Massar
98.9
10
Jamoldo's picture
Jamoldo
98.8
success
From 10 rejections to 1 dream investment banking internship

“... I believe it was the single biggest reason why I ended up with an offer...”