Filling In An M by N Matrix Based On Row And Column Constraints

acemanhattan

New Member
Joined
May 11, 2016
Messages
45
Here's the scenario: You have 1,2,3,...N tasks to do sequentially, all which take a range of time to complete (column constraint), but you're only allowed to set aside a certain amount of time on each of M days (row constraint) to complete these tasks.

Example: You have a 5 chapter book to read, but you can only set enough time aside to read 12 pages a day during the week and, oddly, 6 pages a day during the weekend.

In our example the matrix acts as a "schedule" that shows how many pages of each chapter you'll read on a given day, and projects when you'll finish reading the book.

I envision a matrix that looks something like the following

Chapter 1Chapter 2Chapter 3Chapter 4Chapter 5
91129814
Day 11293
Day 21284
Day 31212
Day 41212
Day 512174
Day 666
Day 764

<tbody>
</tbody>

I spent a few hours yesterday trying to do this with a combination of if(sum()) type statements, but couldn't figure out anything the would work, so I appreciate any solutions you might have (though I prefer Non VBA solutions).
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
This formula should work for you. The 0's can be removed via conditional formatting, or by a very ugly IF formula.
Note that the blank row and column are needed, but can be hidden if desired.


Unknown
ABCDEFGH
1Chapter 1Chapter 2Chapter 3Chapter 4Chapter 5
291129814
3
4Day 11293000
5Day 21208400
6Day 312001200
7Day 412001200
8Day 51200183
9Day 6600006
10Day 7600005
Sheet1
Cell Formulas
RangeFormula
D4=MIN(D$2-SUM(D$3:D3),$B4-SUM($C4:C4))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,036
Messages
6,122,794
Members
449,095
Latest member
m_smith_solihull

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top