Urgent!! Can't get it work!

crafty

New Member
Joined
Jul 20, 2012
Messages
11
Hi there :eek:

I have a spreadsheet which I just couldn't figure out what is wrong with the formula.

The following arguments need to be in the formula.

  • I want excel to show me (in row X) how long it took to issue the order. Beginning from the day, the order was created.
  • If the order was on credit hold, then it should count from the date the order was released released (crow M) until the order was issued (row P). I also want it to count by workingdays only!
  • Anther thing ist, that if the order was placed before noon, then it should count from the first day on, otherwise it should start counting from the next day. This is why I separated day and time.

This is how I tried it:
=IF($M5<>"",(IF($I5<$V$1,NETWORKDAYS($H5,$U5),NETWORKDAYS($H5+1,$U5))),(IF($O5>$V$1,NETWORKDAYS($N5,$U5),NETWORKDAYS($N5+1,$U5))))

But I didn't even get it to distinguish between the times :confused:

2nja7lx.png
[/IMG]

This drives me nuts :ROFLMAO: Thanks for your help!
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Hopefully this should do it, I haven't used the additional columns splitting date and time


Excel 2007
GHIJ
1Order CreateCredit ReleaseGoods IssueCALC
203/01/2011 08:2906/01/2011 09:1014/01/2011 15:587
303/01/2011 08:3404/01/2011 15:452
403/01/2011 14:5305/01/2011 16:042
504/01/2011 13:53
Sheet1
Cell Formulas
RangeFormula
J2=IF(HOUR(MAX(G2,H2))<12,NETWORKDAYS(MAX(H2,G2),I2),NETWORKDAYS(MAX(H2,G2)+1,I2))
J3=IF(HOUR(MAX(G3,H3))<12,NETWORKDAYS(MAX(H3,G3),I3),NETWORKDAYS(MAX(H3,G3)+1,I3))
J4=IF(HOUR(MAX(G4,H4))<12,NETWORKDAYS(MAX(H4,G4),I4),NETWORKDAYS(MAX(H4,G4)+1,I4))
 
Upvote 0
Thanks for your quick help GorD. :cool:

I adapted the formula and it seems to work. But this one got me confused. Is this due to the time which isn out of the ordinary? How does he come up with a difference of (negative) two days? :confused:

34ipjc2.png
 
Upvote 0
It's causing an error in the calc because the start date is becoming > the complete date (as we are adding a +1 as its after12pm) - net work days needs the smaller number to be first
 
Upvote 0
You could wrap the whole thing in another max statement with a one, so any value less than 1 would revert to 1
 
Upvote 0
well, with another If-argument you mean? This is what I tried, but it wouldn't work. The red bolded part is the original formula which is absolutely correct.

=IF(MAX(IF(HOUR(MAX(G7834,J7834))<12,NETWORKDAYS(MAX(J7834,G7834),M7834),NETWORKDAYS(MAX(J7834,G7834)+1,M7834)))<0,"1",IF(HOUR(MAX(G7834,J7834))<12,NETWORKDAYS(MAX(J7834,G7834),M7834),NETWORKDAYS(MAX(J7834,G7834)+1,M7834)))
 
Upvote 0
more like

=max(1,IF(HOUR(MAX(G2,H2))<12,NETWORKDAYS(MAX(H2,G2),I2),NETWORKDAYS(MAX(H2,G2)+1,I2)))
 
Upvote 0
Okay thanks for that hint also! Got it worked out so far and it seems to work and to pull the right data. It starts driving me nuts again tough. I made him give me the number of total days the orders were proceeded, less than 5, than 10 and then all else greater than 10. There but the total didn't match the overall total of orders and there was a slight difference of 89 pcs.
I now set a filter and found out, that he wouldn't put exactly 89 pcs. in order, when I sort the orders by the time they were proceeded. To me it seems, that he ignores them. Does anybody have any idea, what the problem could be?

Thanks!
 
Upvote 0

Would really appreciate if anybody would take a look into this big thing. I really can't figure it out! :confused: :eek:

This is part of the table I'm trying to set up. You'll find the deviating numbers on the top left and right.
G
I
J
L
M
R
S
T
U
V | W | X | Y |
1
by quantity
by %
Lead time whithin
2
total of orders
10896
<5 days
<10 days
>10
3
overrun delivery date
2970
27.26%
7681
2277
849
10807
4
on credit release
2497
22.92%
5
Orders overrun delivery day by
6
<5 days
<10 days
>10 days
7
2352
385
233
2970
8
9
Orders on credit block
10
<5 days
<10 days
>10 days
11
1446
74
39
1559
12
13
Order_create
Credit_block
Credit_release
Req_delivery
Goods_issue
Total days proceeded
On credit block
Days overrun
14
4/6/11 12:56 PM
4/7/2011
4/6/11 7:23 PM
1
15
5/3/11 3:29 PM
5/3/2011
5/3/11 4:04 PM
1
16
6/22/11 12:19 PM
6/22/2011
6/22/11 2:14 PM
1
17
8/12/11 2:34 PM
8/12/2011
8/12/11 3:32 PM
1
18
2/23/11 2:34 PM
2/24/2011
2/23/11 4:25 PM
1
19
5/20/11 2:26 PM
5/20/2011
5/20/11 7:04 PM
1
20
9/6/11 3:27 PM
9/12/2011
9/6/11 6:32 PM
1
21
10/14/11 3:31 PM
10/20/2011
10/14/11 4:43 PM
1
22
10/4/11 12:17 PM
10/5/2011
10/4/11 7:16 PM
1
23
12/21/11 3:25 PM
12/21/2011
12/21/11 6:04 PM
1
24
8/26/11 5:47 PM
9/2/2011
8/26/11 6:34 PM
1
25
9/16/11 2:34 PM
9/26/2011
9/16/11 5:39 PM
1
26
2/22/11 10:37 AM
2/22/11 10:37 AM
2/22/11 10:55 AM
2/28/2011
371
1
27
2/3/11 12:11 PM
2/3/2011
2/3/11 1:19 PM
1
28
5/12/11 12:42 PM
5/13/2011
5/12/11 5:42 PM
1

<tbody>
</tbody>

Formulas used as follows:
I2: =COUNTA($R14:$R30000)
I3: =COUNT($T14:$T30011)
I4: =COUNT($J14:$J30011)

V3: =COUNTIF($R14:$R30000,"<=5")
W3: =(COUNTIF($R14:$R30000,"<=10"))-V3
X3: =COUNTIF($R14:$R30007,">10")
Y3: =SUM(V3:X3)

V7: =COUNTIF($T14:$T30011,"<=5")
W7: =(COUNTIF($T14:$T30011,"<=10"))-$V$7
X7: =(COUNTIF($T14:$T30011,">10"))
Y7: =SUM(V7:X7)

Same for the credit one.


Then for the matrix itself as follows:

R14: =IF((IF((HOUR(G14)<12),(NETWORKDAYS(G14,(IF(M14="",TODAY(),M14)))),(NETWORKDAYS((G14+1),(IF(M14="",TODAY(),M14))))))<=0,"1",(IF((HOUR(G14)<12),(NETWORKDAYS(G14,(IF(M14="",TODAY(),M14)))),(NETWORKDAYS((G14+1),(IF(M14="",TODAY(),M14)))))))
S14: =IF((IF(I14<>"",(IF(HOUR(MAX(I14,J14))<12,NETWORKDAYS(MAX(I14),J14),NETWORKDAYS(MAX(I14)+1,J14))),""))<=0,"1",(IF(I14<>"",(IF(HOUR(MAX(I14,J14))<12,NETWORKDAYS(MAX(I14),J14),NETWORKDAYS(MAX(I14)+1,J14))),"")))
T14: =IF(($L14+1)>$M14,"",(NETWORKDAYS($L14,$M14)))


Thanks so much! :p

<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

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