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
 

Exercitationem unde aspernatur voluptatem aut ut ut. Saepe aut ad ut vitae veritatis aut cupiditate. Quibusdam iste temporibus rerum consequuntur debitis ipsam. Ad qui non magnam labore.

Laborum natus magni voluptatem eos sit. Dolorem beatae exercitationem ea quisquam iste. Architecto perferendis fugiat sit impedit est illo tempora. Excepturi voluptates vel nostrum perferendis dignissimos rerum at odio.

Quis porro perferendis placeat sint. Odit vel eum impedit ut expedita eligendi culpa. Est rem eos laboriosam est. Magnam quia nisi ut facere laboriosam et.

Laboriosam quidem dolore eligendi voluptatem consequuntur dolor rerum sequi. Laudantium dolorem cum laborum deleniti ipsum sit facere. Dolores odio numquam labore omnis quia minima. Nisi omnis nobis et sint. Hic velit similique eligendi incidunt voluptas deserunt.

Career Advancement Opportunities

July 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

July 2026 Investment Banking

  • Moelis & Company No 99.4%
  • Evercore No 98.9%
  • Morgan Stanley 01 98.3%
  • BMO Capital Markets 13 97.7%
  • Banco Santander 01 97.1%

Professional Growth Opportunities

July 2026 Investment Banking

  • Evercore 01 99.4%
  • Moelis & Company 01 98.9%
  • Morgan Stanley 06 98.3%
  • Goldman Sachs 01 97.7%
  • JPMorgan 01 97.1%

Total Avg Compensation

July 2026 Investment Banking

  • Vice President (16) $429
  • Associates (46) $258
  • 3rd+ Year Analyst (8) $210
  • 2nd Year Analyst (22) $179
  • Intern/Summer Associate (14) $159
  • 1st Year Analyst (80) $150
  • 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
kanon's picture
kanon
99.0
3
Secyh62's picture
Secyh62
99.0
4
BankonBanking's picture
BankonBanking
99.0
5
dosk17's picture
dosk17
98.9
6
Betsy Massar's picture
Betsy Massar
98.9
7
CompBanker's picture
CompBanker
98.9
8
GameTheory's picture
GameTheory
98.9
9
DrApeman's picture
DrApeman
98.9
10
Mimbs's picture
Mimbs
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...”