# Tricky Excel problem: spreading amounts over user inputted number of columns

1. ## Tricky Excel problem: spreading amounts over user inputted number of columns

I've run into a tricky problem which I think I have an inelegant solution for, but wanted to see if there was something cleaner. It takes a bit of explaining so please bear with me:

The problem essentially boils down to this: think of 2 inputs, how much money I get in a given day, and how long that money lasts me. A simple version of the model looks like this:
• Input 1 - how many days money lasts me: 3
• Input 2 - amount of money received on day 1: \$300

The output would essentially be a bunch of columns representing day 1 to day 20, and depending on my inputs, they show how much money I can spend each day. Let's assume for simplicity that that amount is just amount received divided by days.

This is the first area of trickiness, I it's not enough for me to put \$300/3 in each cell, but the cells need to know when the 3 days has been reached, and if someone put 5 instead, they need to similarly now divide \$300/5 but now show up in 5 cells, with the remaining days showing 0.

If it was simply this I think it would be a relatively easy solution, but the tricky thing is the way I have it, it's not just day 1 where I input how much money, but imagine now I have random payments coming in that the user can input (e.g. ok \$300 day 1, \$500 day 3, \$1000 day 7). Thankfully the number of days it lasts me will be consistent. So as an example, this is what I would expect to get spit out with the following inputs:
• # of days money lasts: 4
• Day #1 money received: \$100
• Day #3 money received: \$500
• Day #4 money received: \$1000

Should spit out the following values:
• Day #1 money to spend: \$25 (\$100/4)
• Day #2 money to spend: \$25 (\$100/4)
• Day #3 money to spend: \$150 (\$100/4 + \$500/4)
• Day #4 money to spend: \$400 (\$100/4 + \$500/4 + \$1000/4)
• Day #5 money to spend: \$375 (\$500/4 + \$1000/4)
• Day #6 money to spend: \$375 (\$500/4 + \$1000/4)
• Day #7 money to spend: \$250 (\$1000/4)

Hopefully this makes the problem clear. Right now my solution is to make a pretty big table (20x20 if it's 20 days), but I'm not sure if there's a more elegant solution. Thank you!

2. ## Re: Tricky Excel problem: spreading amounts over user inputted number of columns

Hi, welcome to the forum

I think I understand what you want, but it would probably be better if you could upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.

To attach a file to your post,
click advanced (next to quick post),
scroll down until you see "manage file",
click that and select "add files" (top right corner).
click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

Once the upload is completed the file name will appear below the input boxes in this window.
You can then close the window to return to the new post screen.

##### Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1