Rounding up for down based on cell value

G

Guest

I'd like to be able to enter a dollar amount (say A1 = $22.05) and then have
8 cells display dollar amounts that add up to A1. Is there a function that
would round up or down the correct number of cells (to two decimal places) to
equal $22.05?
 
J

JE McGimpsey

one way, if I understand you correctly:

A1: 22.05
A2: =ROUND(A1/8,2)
A3-A8: =A$2
A9: =A1-SUM(A2:A8)
 
G

Guest

That's close to what I was looking for. Instead of having the last cell just
being what's left though, I'd like to have the cells distributed as evenly as
possible. For example, using the $22.05 from before, I'd like to end up with
5 cells that say $2.76 and 3 that say $2.75. Is that possible?
 
J

JE McGimpsey

THis seems to work fairly well. I'm not sure it's necessarily
generalizable for other numbers of cells:

A1: 22.05
A2: =ROUND(A1/8,2)
A3: =ROUND(-SUM(-$A$1,$A$2:A2)/(10-ROW()),2)

Copy A3 down to A9
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top