One of my all time favorite comedies is The Hangover. It is the story of four friends – Alan, Stu, Doug & Phil going to Las Vegas for an (un)forgettable night of adventure and mayhem. While the movie did end on a happy note, they forgot one little thing.
They didn’t share the expenses!
So in this installment of Excel Homework, can you split the expenses?

The Problem
Assuming you have below data (feel free to copy paste it in to your Excel, or use this workbook):
Expense Details
Phil: 255.12,121.29,160.23
Alan: 43.17,226.76,343.66,358.01
Phil: 159.95,177.56,278.37
Stu: 206.51,188.09,244.68,33.21,152.98
Phil: 285.91,306.4,140.68
Doug: 226.76,226.76,169.6,208.67
Phil: 326.4
Phil: 308.43,224.95,102.33
Phil: 168.64
Stu: 259.93
Stu: 121.29
Stu: 177
Alan: 172.23
Alan: 214.04,162.58,205.66,188.16,128.41
Alan: 62.75,160.51,173.34,283.8
Phil: 356.3,361.34,41.35,255.94,67.42
Stu: 168.25,161.28,248.45
Doug: 163.93,308.43,218.58
Phil: 226.04,265.97,140.81,197.45
Doug: 216.79,180.39,246.65,149.55
Your need to generate a a table like this to show who needs to pay whom & how much.

Get cracking then!
Sample file & Your Solution:
Click here to download the sample file with the expenses data.
You can use any Excel feature to come up with the answer.
Tell me how you solved it using the comments box below 👇
Watch my solution:
I made a video about this problem and one approach to solve it (using Power Query and Dynamic Array Formulas). Check it out below or on my Channel.
More homework problems:
Need a challenge? I got one or many for you:














11 Responses to “Use Alt+Enter to get multiple lines in a cell [spreadcheats]”
@Chandoo:
One more useful trick.......
In a column you have no. of data in rows and need to copy in the next row from the previous row, no need to go for the previous rows but entering Alt + down arrow, you will get the list of data, (in asending order), entered in the previous rows...
This is another great tip. I use this all the time to make sense of some *very* long formulas. As soon as the formula is debugged I remove the break.
Great tip Chandoo!
I use this feature often and it has even gotten the, "how did you do that" response.
Thanks!
@Ketan: Alt+down arrow is an awesome tip. I never knew it and now I am using it everyday.
@Jorge, Tony: Agree... 🙂
[...] Day 1: Insert Line Breaks in a Cell [...]
how can we merge a two sheet.
excellent idea. Chandoo you are genious
Hi chandoo,
I have used ctrl+enter to break the cell. But I did not get the result.
Please tell me how can i break the cell in multiple lines.
Hi, Ranveer,
Its not Ctrl+enter to break the cell, use Alt+Enter to make it happen.
hi Chandoo....
how we can use Alt+Enter in multiple rows at the same time please reply hurry i have lot of work and have no time and i m stuck in this. 🙁
Alt+J worked once 🙁
So I found another more reliable way:
=SUBSTITUTE(A2,CHAR(13),"")
Where A2 is the cell that contains the line breaks which the code for it is CHAR(13). It will replace it with whatever inside the ""