tblackwell
New Member
- Joined
- Oct 24, 2018
- Messages
- 28
- Office Version
- 365
- Platform
- Windows
Hi I am working on a spreadsheet that will calculate what hour a store should close based upon it's last hour or sales.
The logic works like this:
a) If a store has greater than $100 of sales in it's last hour, close one hour later.
b) If a store has less than $50 of sales in it's last hour, close one hour earlier.
I've got (a) figured out, no issues. It's (b) I am struggling with. I can get it to work for the earliest hour, but not every hour.
=IF(L5>$N$2,"2am",IF(K5>$N$2,"1am",IF(J5>$N$2,"12am",IF(I5>$N$2,"11pm",IF(H5>$N$2,"10pm",IF(H5<50,"8pm","9pm"))))))
What do I need to do to solve this puzzle? Open to all and all options!
The logic works like this:
a) If a store has greater than $100 of sales in it's last hour, close one hour later.
b) If a store has less than $50 of sales in it's last hour, close one hour earlier.
I've got (a) figured out, no issues. It's (b) I am struggling with. I can get it to work for the earliest hour, but not every hour.
=IF(L5>$N$2,"2am",IF(K5>$N$2,"1am",IF(J5>$N$2,"12am",IF(I5>$N$2,"11pm",IF(H5>$N$2,"10pm",IF(H5<50,"8pm","9pm"))))))
What do I need to do to solve this puzzle? Open to all and all options!
Colomex Hourly Sales Totals_v3 - for mrexcel.xlsx | |||||||||
---|---|---|---|---|---|---|---|---|---|
H | I | J | K | L | M | N | |||
4 | Average of 8pm - 9pm | Average of 9pm - 10pm | Average of 10pm -11pm | Average of 11pm - 12am | Average of 12am - 1am | Current Close | Recommended Close | ||
5 | $292 | $190 | $145 | $58 | $3 | 12am | 12am | ||
6 | $294 | $220 | $168 | $79 | $0 | 12am | 1am | ||
7 | $395 | $311 | $177 | $46 | $0 | 11:45pm | 12am | ||
8 | $365 | $306 | $284 | $70 | $2 | 11:45pm | 12am | ||
9 | $185 | $163 | $124 | $40 | $0 | 12am | 12am | ||
10 | $165 | $140 | $108 | $67 | $20 | 12am | 12am | ||
Summary |
Cell Formulas | ||
---|---|---|
Range | Formula | |
N5 | N5 | =IF(L5>$N$2,"2am",IF(K5>$N$2,"1am",IF(J5>$N$2,"12am",IF(I5>$N$2,"11pm",IF(H5>$N$2,"10pm",IF(H5<50,"8pm","9pm")))))) |
N6:N10 | N6 | =IF(L6>$N$2,"2am",IF(K6>$N$2,"1am",IF(J6>$N$2,"12am",IF(I6>$N$2,"11pm",IF(H6>$N$2,"10pm"))))) |