CJS548

New Member
Joined
Dec 11, 2013
Messages
25
Hi, this is a very simple request...
i know there must be another way around, but this is what i have based on my limited knowledge...
please shorten this formula for me:

Code:
=WORKDAY.INTL(N4,(ROUND(VLOOKUP((IF((IFNA(VLOOKUP(J4,$T$14:$T$21,1,0),"OTHERS"))=("RAW"),"SCR",IF((IFNA(VLOOKUP(J4,$T$14:$T$21,1,0),"OTHERS"))=("RAW D"),"SCR",IF((IFNA(VLOOKUP(J4,$T$14:$T$21,1,0),"OTHERS"))=("ALI SYDNEY"),"ALI",IF((IFNA(VLOOKUP(J4,$T$14:$T$21,1,0),"OTHERS"))=("ALTONA"),"VINNIES",IF((IFNA(VLOOKUP(J4,$T$14:$T$21,1,0),"OTHERS"))=("DANDENONG"),"VINNIES",IF((IFNA(VLOOKUP(J4,$T$14:$T$21,1,0),"OTHERS"))=("SHEPARTON"),"VINNIES",IF((IFNA(VLOOKUP(J4,$T$14:$T$21,1,0),"OTHERS"))=("ACR"),"ACR","OTHERS")))))))),$T$7:$Y$10,6,0),1)),11,$AC$14:$AC$49)

actually the purpose of this formula is to see the cell is for what item.
VINNIES is a category consists of DANDENONG, ALTONA and SHEPARTON. etc etc for the rest...
and if the cell is dandenong, it will return vinnies, then base on the category vinnies, i will have another table that states how many days i need for vinnies.
then the cells need to return the days needed, which will be added into this formula as well, using vlookup.
i know its a bit messy... but this is how i can describe it...
upload an image to help clear things up.
thanks!
 

Attachments

  • excel formula work days required.png
    excel formula work days required.png
    128.9 KB · Views: 17

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Hi, your attachment is difficult to read, In addition I see that you can't show some data.
Please try prepare a data example using add-in specifically for this and it can be found here XL2BB
Pay attention to this post XL2BB 2 Squares
 
Upvote 0
Book1
HIJKLMNOPQRSTUVW
6OTHERS13001
7CTYDRAW D10/12/20191088SCRSCR1114300197000.731.38
8CTYDACR16/12/20196/12/201913/12/2019163ACRALI33900203000.195.21
9CTYDALI SYDNEY16/12/20195/12/201912/12/2019164ALIVINNIES33900198000.205.08
10CTYDALTONA16/12/201928/11/20194/12/20191612VINNIESACR33900225000.175.77
11OTHERS2026000
12OTHERS
13OTHERS
14OTHERSRAWWORKDAYS:24.00
15OTHERSRAW D
16OTHERSALI SYDNEY
17ALTONA
18DANDENONG
19SHEPARTON
20ACR
21OTHERS
28.11 (2)
Cell Formulas
RangeFormula
M7, M8:M10M7=J7-I$2
N7, N8:N10N7=IF(ISBLANK(L7),88,J7-L7)
U7:U10U7=S7/T7
V7:V10V7=T7/S7
L8:L10L8=WORKDAY.INTL(K8,(ROUND(VLOOKUP((IF((IFNA(VLOOKUP(I8,$Q$14:$Q$21,1,0),"OTHERS"))=("RAW"),"SCR",IF((IFNA(VLOOKUP(I8,$Q$14:$Q$21,1,0),"OTHERS"))=("RAW D"),"SCR",IF((IFNA(VLOOKUP(I8,$Q$14:$Q$21,1,0),"OTHERS"))=("ALI SYDNEY"),"ALI",IF((IFNA(VLOOKUP(I8,$Q$14:$Q$21,1,0),"OTHERS"))=("ALTONA"),"VINNIES",IF((IFNA(VLOOKUP(I8,$Q$14:$Q$21,1,0),"OTHERS"))=("DANDENONG"),"VINNIES",IF((IFNA(VLOOKUP(I8,$Q$14:$Q$21,1,0),"OTHERS"))=("SHEPARTON"),"VINNIES",IF((IFNA(VLOOKUP(I8,$Q$14:$Q$21,1,0),"OTHERS"))=("ACR"),"ACR","OTHERS")))))))),$Q$7:$V$10,6,0),1)),11,$Z$14:$Z$49)
S7:S10, S11S7=R7*$S$6
R11R11=SUM(R7:R10)
W14W14=NETWORKDAYS.INTL(X13,Y13,11,Z13:Z57)
P6:P16P6=IF((IFNA(VLOOKUP(I6,$Q$14:$Q$21,1,0),"OTHERS"))=("RAW"),"SCR",IF((IFNA(VLOOKUP(I6,$Q$14:$Q$21,1,0),"OTHERS"))=("RAW D"),"SCR",IF((IFNA(VLOOKUP(I6,$Q$14:$Q$21,1,0),"OTHERS"))=("ALI SYDNEY"),"ALI",IF((IFNA(VLOOKUP(I6,$Q$14:$Q$21,1,0),"OTHERS"))=("ALTONA"),"VINNIES",IF((IFNA(VLOOKUP(I6,$Q$14:$Q$21,1,0),"OTHERS"))=("DANDENONG"),"VINNIES",IF((IFNA(VLOOKUP(I6,$Q$14:$Q$21,1,0),"OTHERS"))=("SHEPARTON"),"VINNIES",IF((IFNA(VLOOKUP(I6,$Q$14:$Q$21,1,0),"OTHERS"))=("ACR"),"ACR","OTHERS")))))))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
L20:L22Cell Value<$I$2textNO
L13Cell Value<$I$2textNO
L9:L10Cell Value<$I$2textNO
L11Cell Value<$I$2textNO
L8Cell Value<$I$2textNO
W14,V7:Z11Expression=AND(V7<>"",ABS(V7-ROUND(V7,0))<=0.2)textNO
N4:N53Cell Value<1textNO
M4:M53Cell Value<7textNO
L4:L6Cell Value<$I$2textNO
L7Cell Value<$I$2textNO
L12,L14:L19,L23:L27,L29:L53Cell Value<$I$2textNO
 
Upvote 0
Taking your example in L8, you can put this
Code:
=WORKDAY.INTL(K8,ROUND(INDEX(myOthers,MATCH(INDEX(myRange,MATCH(I8,myDetail,0),2),myCategory,0),6),1),11,myHolidays)

Book1
ABCDEFGHIJKLMNOPQRSTUV
1
2
3
4Table 1. Origin01/12/201931/12/2019
5WORKDAYS:2411/12/2019
625/12/2019
7CTYDRAW D10/12/201910/12/201988
8CTYDACR16/12/201906/12/201913/12/201916/12/20193
9CTYDALI SYDNEY16/12/201905/12/201912/12/201916/12/20194
10CTYDALTONA16/12/201928/11/201904/12/201916/12/201912
11
12
13
14
15
16
17
18
19
20
21
22
23
24Table 2.a name (you can change this)1300
25RAWSRC
26RAW DSRC
27ALI SYDNEYALITable 3.
28ALTONAVINNIESSCR1114300197000.7258883251.377622378
29DANDENONGVINNIESALI33900203000.1921182275.205128205
30SHEPARTONVINNIESVINNIES33900198000.1969696975.076923077
31ACRACRACR33900225000.1733333335.769230769
32OTHERSOTHERS2026000
33
Sheet5
Cell Formulas
RangeFormula
R5R5=NETWORKDAYS.INTL(start_date,end_date,11,myHolidays)
M7, M8:M10M7=J7-I$2
N7, N8:N10N7=IF(ISBLANK(L7),88,J7-L7)
L8:L10L8=WORKDAY.INTL(K8,ROUND(INDEX(myOthers,MATCH(INDEX(myRange,MATCH(I8,myDetail,0),2),myCategory,0),6),1),11,myHolidays)
P28:P31P28=N28/O28
Q28:Q31Q28=O28/N28
N28:N31N28=M28*base_value
M32M32=SUM(M28:M31)
N32N32=M32*$N$24


And there are the follow names:
names_.JPG
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,262
Members
449,075
Latest member
staticfluids

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