MS Office Forum / Excel / New Users / October 2004
Production by worker
|
|
Thread rating:  |
Nadeem Shafiullah - 26 Oct 2004 02:26 GMT Hi everyone
Everyday several factory worker produce mattress in my factory. I scan the production ticket and enter the qty produced by SKU nos on different worksheets. Every worker has different worksheet. All the worksheet are then summed up to give the total qty produced.
I have almost 100 models and every time I have to enter the qty I have to look for that particular model. (usually a worker produce only 4 or 5 models)
I wish I have a form which has model field, worker field and qty field. I choose the model and choose the worker and enter the qty. It should give me the total qty by each worker.
Suggestion would be very much appreciated.
thanks Nadeem
JulieD - 26 Oct 2004 02:36 GMT Hi Nadeem
Thinking about this for you - couple of questions: what is the reason that each worker has a different worksheet? and how many workers are we talking about? What version of excel? have you any experience with VBA?
Cheers JulieD
> Hi everyone > [quoted text clipped - 15 lines] > thanks > Nadeem Arvi Laanemets - 26 Oct 2004 08:04 GMT Hi
Some on-fly example here. It's designed to use for a year. In next year you save past years workbook with new name, clear all production entries, enter new year number into Dates sheet, and can start with new years data.
Create a sheet Workers Into cell A3 enter 'Workers' A4 and down enter the list of workers (you can have additional data for every worker in adjacent columns, but I'll ignnore it). (I started the workers list from A4, so it'll be easier to design report sheets later.) Define a dynamic named range Workers =OFFSET(Workers!$A$4,,,COUNTIF(Workers!$A:$A,"<>")-1,1)
Create a sheet Models A1='Models' Into cell A2 and down enter the list of models you produce. Define a dynamic named range Models =OFFSET(Models!$A$2,,,COUNTIF(Models!$A:$A,"<>")-1,1)
Create a sheet Dates A1='Year' A2- enter the year the workbook is meant for.
C1='Dates' C2=IF(YEAR(TODAY()-15)<>$A$2,"",DATE(YEAR(TODAY()-15),MONTH(TODAY()-15),1)) C3=IF(OR(YEAR(IF(C3="",TODAY()+1,C3)+1)<>$A$2,IF(C3="",TODAY()+1,C3)+1>TODAY ()),"",C3+1) Copy C3 down (At least to cell C46, I think. You must get a list of dates starting with 1st of current or previous month, and ending with current date, with at least 15 dates in list - but only from year in cell A2. Of-course you can define the dates list in your own way). Format the range C2:C46 in some date format. Define a named range Days =OFFSET(Dates!$C$2,,,COUNTIF(Dates!$C:$C,">0"),1)
E1='Months' E2=IF(DATE($A$2,ROW()-1,1)>TODAY(),"",DATE($A$2;ROW()-1,1)) Copy the formula down to E13, and format the range E2:E13 as Custom "mmmm" Define a named range Months =OFFSET(Dates!$E$2,,,COUNTIF(Dates!$E:$E,">0"),1)
Create a sheet Production A1:D1 enter headers (Date, Worker, Model, Quantity) Select cell A2, from menu select Data.Validation.List and into Source field enter =Days Format A2 as date Select B2. Again Data.Validation.List, with Source=Workers Select C2. Data.Validation.List with Source=Models Copy A2:C2 down for as many rows as you need. Define named ranges ProdDate=OFFSET(Production!$A$2,,,COUNTIF(Production!$A:$A,">0"),1) ProdWorker=OFFSET(Production!$B$2,,,COUNTIF(Production!$A:$A,">0"),1) ProdModel=OFFSET(Production!$C$2,,,COUNTIF(Production!$A:$A,">0"),1) ProdQty=OFFSET(Production!$D$2,,,COUNTIF(Production!$A:$A,">0"),1)
Here you enter all your production data. You can use autofilter to hide filled rows when entering new data.
On all sheets, avoid empty rows. Whenever you need to delete some entry, delete the entire row only.
Now you need various report sheets. A couple of examples. Create a sheet DailyRep A1='Date:' A2 - create a data validation list with source=Days and format as date A3='Worker' B3=IF(COLUMN()-1<=SUMPRODUCT(--(Models<>"")),INDEX(Models,COLUMN()-1,1),"") and copy to right so all your models are displayed. A4=IF(ISERROR(Workers),"",Workers) and copy down so all your workers are displayed. B4=IF(OR($A4="",B$3=""),"",SUMPRODUCT(--(ProdDate=$A$2),--(ProdWorker=$A4),- -(ProdModel=B$3),--(ProdQty))) and copy it into table determined by workers and models headers. Now when you select a date from list, all production data for this day are displayed. (Maybe you need to switch row and column layout in this report - and maybe you prefer to display nothing when quantity=0. Also you can add summary row/column, etc.)
To create a monthly report like dayly above, create a copy of DailyRep, and rename it as MonthlyRep. A1='Month:' A2 - data validation lists source=Months, and format as Custom "mmmm" B4=IF(OR($A4="";B$3=""),"",SUMPRODUCT(--(MONTH(ProdDate)=MONTH($A$2)),--(Pro dWorker=$A4),--(ProdModel=B$3),--(ProdQty))) and copy it into table determined by workers and models headers.
You can have any number of report sheets, p.e. you can have a report where you select a worker, and get listed all models by dates, he produced in year or month {for such report you'll need an additional column (can be hidden) in production sheet} and so on.
 Signature Arvi Laanemets (When sending e-mail, use address arvil<At>tarkon.ee)
> Hi everyone > [quoted text clipped - 15 lines] > thanks > Nadeem J_J - 26 Oct 2004 10:00 GMT Nice piece of formulation. Thanks Arvi... But received a "circular reference" error for the declaration C3=IF(OR(YEAR(IF(C3="",TODAY()+1,C3)+1)<>$A$2,IF(C3="",TODAY()+1,C3)+1>TODAY ()),"",C3+1) on Dates sheet. Hope you can locate the error. J_J
> Hi > [quoted text clipped - 21 lines] > > C1='Dates' C2=IF(YEAR(TODAY()-15)<>$A$2,"",DATE(YEAR(TODAY()-15),MONTH(TODAY()-15),1))
C3=IF(OR(YEAR(IF(C3="",TODAY()+1,C3)+1)<>$A$2,IF(C3="",TODAY()+1,C3)+1>TODAY
> ()),"",C3+1) > Copy C3 down (At least to cell C46, I think. You must get a list of dates [quoted text clipped - 37 lines] > A2 - create a data validation list with source=Days and format as date > A3='Worker' B3=IF(COLUMN()-1<=SUMPRODUCT(--(Models<>"")),INDEX(Models,COLUMN()-1,1),"")
> and copy to right so all your models are displayed. > A4=IF(ISERROR(Workers),"",Workers) > and copy down so all your workers are displayed. B4=IF(OR($A4="",B$3=""),"",SUMPRODUCT(--(ProdDate=$A$2),--(ProdWorker=$A4),-
> -(ProdModel=B$3),--(ProdQty))) > and copy it into table determined by workers and models headers. [quoted text clipped - 8 lines] > A1='Month:' > A2 - data validation lists source=Months, and format as Custom "mmmm" B4=IF(OR($A4="";B$3=""),"",SUMPRODUCT(--(MONTH(ProdDate)=MONTH($A$2)),--(Pro
> dWorker=$A4),--(ProdModel=B$3),--(ProdQty))) > and copy it into table determined by workers and models headers. [quoted text clipped - 25 lines] > > thanks > > Nadeem Arvi Laanemets - 26 Oct 2004 10:04 GMT Hi
A typo there (probably I copied the formula from cell C4 instead) - replace C3 with C2 in formula.
 Signature Arvi Laanemets (When sending e-mail, use address arvil<At>tarkon.ee)
> Nice piece of formulation. Thanks Arvi... > But received a "circular reference" error for the declaration C3=IF(OR(YEAR(IF(C3="",TODAY()+1,C3)+1)<>$A$2,IF(C3="",TODAY()+1,C3)+1>TODAY
> ()),"",C3+1) > on Dates sheet. [quoted text clipped - 28 lines] > > > > C1='Dates' C2=IF(YEAR(TODAY()-15)<>$A$2,"",DATE(YEAR(TODAY()-15),MONTH(TODAY()-15),1))
C3=IF(OR(YEAR(IF(C3="",TODAY()+1,C3)+1)<>$A$2,IF(C3="",TODAY()+1,C3)+1>TODAY
> > ()),"",C3+1) > > Copy C3 down (At least to cell C46, I think. You must get a list of dates [quoted text clipped - 38 lines] > > A2 - create a data validation list with source=Days and format as date > > A3='Worker' B3=IF(COLUMN()-1<=SUMPRODUCT(--(Models<>"")),INDEX(Models,COLUMN()-1,1),"")
> > and copy to right so all your models are displayed. > > A4=IF(ISERROR(Workers),"",Workers) > > and copy down so all your workers are displayed. B4=IF(OR($A4="",B$3=""),"",SUMPRODUCT(--(ProdDate=$A$2),--(ProdWorker=$A4),-
> > -(ProdModel=B$3),--(ProdQty))) > > and copy it into table determined by workers and models headers. [quoted text clipped - 9 lines] > > A1='Month:' > > A2 - data validation lists source=Months, and format as Custom "mmmm" B4=IF(OR($A4="";B$3=""),"",SUMPRODUCT(--(MONTH(ProdDate)=MONTH($A$2)),--(Pro
> > dWorker=$A4),--(ProdModel=B$3),--(ProdQty))) > > and copy it into table determined by workers and models headers. [quoted text clipped - 29 lines] > > > thanks > > > Nadeem J_J - 26 Oct 2004 11:29 GMT Thanks Arvi, that solved "this" problem. But a small problem remains. Maybe I've inputted something wrong. Although I enter some production to the involved sheet, the daily and monthly reports pages shows only zero s' as data. J_J
> Hi > [quoted text clipped - 3 lines] > > Nice piece of formulation. Thanks Arvi... > > But received a "circular reference" error for the declaration C3=IF(OR(YEAR(IF(C3="",TODAY()+1,C3)+1)<>$A$2,IF(C3="",TODAY()+1,C3)+1>TODAY
> > ()),"",C3+1) > > on Dates sheet. [quoted text clipped - 28 lines] > > > > > > C1='Dates' C2=IF(YEAR(TODAY()-15)<>$A$2,"",DATE(YEAR(TODAY()-15),MONTH(TODAY()-15),1))
C3=IF(OR(YEAR(IF(C3="",TODAY()+1,C3)+1)<>$A$2,IF(C3="",TODAY()+1,C3)+1>TODAY
> > > ()),"",C3+1) > > > Copy C3 down (At least to cell C46, I think. You must get a list of [quoted text clipped - 40 lines] > > > A2 - create a data validation list with source=Days and format as date > > > A3='Worker' B3=IF(COLUMN()-1<=SUMPRODUCT(--(Models<>"")),INDEX(Models,COLUMN()-1,1),"")
> > > and copy to right so all your models are displayed. > > > A4=IF(ISERROR(Workers),"",Workers) > > > and copy down so all your workers are displayed. B4=IF(OR($A4="",B$3=""),"",SUMPRODUCT(--(ProdDate=$A$2),--(ProdWorker=$A4),-
> > > -(ProdModel=B$3),--(ProdQty))) > > > and copy it into table determined by workers and models headers. [quoted text clipped - 11 lines] > > > A1='Month:' > > > A2 - data validation lists source=Months, and format as Custom "mmmm" B4=IF(OR($A4="";B$3=""),"",SUMPRODUCT(--(MONTH(ProdDate)=MONTH($A$2)),--(Pro
> > > dWorker=$A4),--(ProdModel=B$3),--(ProdQty))) > > > and copy it into table determined by workers and models headers. [quoted text clipped - 34 lines] > > > > thanks > > > > Nadeem J_J - 26 Oct 2004 11:57 GMT Hi Arvil, Please forgive this fool !. :))) I forget to select a month or a day from the A2 cells of the reports pages while expecting to view some data other then zero... Everything works OK. Regards J_J
Arvi Laanemets - 26 Oct 2004 12:05 GMT Hi
Probably at least one condition return always FALSE! For some cell where you except a result>0, p.e. B4 as example, try B4=SUMPRODUCT((ProdQty)) and when this returns some number>0 (When not, then check the format for range ProdQty - it must be general or numeric, or the range definition - is right range returned?), then B4=SUMPRODUCT(--(ProdDate=$A$2),(ProdQty)) B4=SUMPRODUCT((ProdWorker=$A4),(ProdQty)) B4=SUMPRODUCT(--(ProdModel=B$3),(ProdQty)) When any of 3 returns 0 (remember - you MUST except the value>0 for test cell), then for some named range all values in range differ from search value. Check formats and formulas.
 Signature Arvi Laanemets (When sending e-mail, use address arvil<At>tarkon.ee)
> Thanks Arvi, that solved "this" problem. > But a small problem remains. Maybe I've inputted something wrong. [quoted text clipped - 10 lines] > > > Nice piece of formulation. Thanks Arvi... > > > But received a "circular reference" error for the declaration C3=IF(OR(YEAR(IF(C3="",TODAY()+1,C3)+1)<>$A$2,IF(C3="",TODAY()+1,C3)+1>TODAY
> > > ()),"",C3+1) > > > on Dates sheet. [quoted text clipped - 31 lines] > > > > > > > > C1='Dates' C2=IF(YEAR(TODAY()-15)<>$A$2,"",DATE(YEAR(TODAY()-15),MONTH(TODAY()-15),1))
C3=IF(OR(YEAR(IF(C3="",TODAY()+1,C3)+1)<>$A$2,IF(C3="",TODAY()+1,C3)+1>TODAY
> > > > ()),"",C3+1) > > > > Copy C3 down (At least to cell C46, I think. You must get a list of [quoted text clipped - 26 lines] > > > > Define named ranges > > > > ProdDate=OFFSET(Production!$A$2,,,COUNTIF(Production!$A:$A,">0"),1) ProdWorker=OFFSET(Production!$B$2,,,COUNTIF(Production!$A:$A,">0"),1)
> > > > ProdModel=OFFSET(Production!$C$2,,,COUNTIF(Production!$A:$A,">0"),1) > > > > ProdQty=OFFSET(Production!$D$2,,,COUNTIF(Production!$A:$A,">0"),1) [quoted text clipped - 12 lines] > > > > A2 - create a data validation list with source=Days and format as date > > > > A3='Worker' B3=IF(COLUMN()-1<=SUMPRODUCT(--(Models<>"")),INDEX(Models,COLUMN()-1,1),"")
> > > > and copy to right so all your models are displayed. > > > > A4=IF(ISERROR(Workers),"",Workers) > > > > and copy down so all your workers are displayed. B4=IF(OR($A4="",B$3=""),"",SUMPRODUCT(--(ProdDate=$A$2),--(ProdWorker=$A4),-
> > > > -(ProdModel=B$3),(ProdQty))) > > > > and copy it into table determined by workers and models headers. [quoted text clipped - 13 lines] > > > > A1='Month:' > > > > A2 - data validation lists source=Months, and format as Custom "mmmm" B4=IF(OR($A4="";B$3=""),"",SUMPRODUCT(--(MONTH(ProdDate)=MONTH($A$2)),--(Pro
> > > > dWorker=$A4),--(ProdModel=B$3),--(ProdQty))) > > > > and copy it into table determined by workers and models headers. [quoted text clipped - 38 lines] > > > > > thanks > > > > > Nadeem J_J - 29 Oct 2004 07:12 GMT Hi Arvi, Thank you very much for your answers on this thread. I wanted to adapt your code to a similar case of teachers, lesson&classes, periods case but got stuck somewhere on the report page. It will be pretty much easier if you may accept me emailing you my example file. But your email add. looks like not real. My email add is: eserceker (AT) yahoo (DOT) com Would you allow me to email it to your real email add? J_J
> Hi > [quoted text clipped - 33 lines] > > > > Nice piece of formulation. Thanks Arvi... > > > > But received a "circular reference" error for the declaration C3=IF(OR(YEAR(IF(C3="",TODAY()+1,C3)+1)<>$A$2,IF(C3="",TODAY()+1,C3)+1>TODAY
> > > > ()),"",C3+1) > > > > on Dates sheet. [quoted text clipped - 33 lines] > > > > > > > > > > C1='Dates' C2=IF(YEAR(TODAY()-15)<>$A$2,"",DATE(YEAR(TODAY()-15),MONTH(TODAY()-15),1))
C3=IF(OR(YEAR(IF(C3="",TODAY()+1,C3)+1)<>$A$2,IF(C3="",TODAY()+1,C3)+1>TODAY
> > > > > ()),"",C3+1) > > > > > Copy C3 down (At least to cell C46, I think. You must get a list of [quoted text clipped - 27 lines] > > > > > Copy A2:C2 down for as many rows as you need. > > > > > Define named ranges ProdDate=OFFSET(Production!$A$2,,,COUNTIF(Production!$A:$A,">0"),1)
> ProdWorker=OFFSET(Production!$B$2,,,COUNTIF(Production!$A:$A,">0"),1) ProdModel=OFFSET(Production!$C$2,,,COUNTIF(Production!$A:$A,">0"),1)
> > > > > ProdQty=OFFSET(Production!$D$2,,,COUNTIF(Production!$A:$A,">0"),1) > > > > > [quoted text clipped - 12 lines] > date > > > > > A3='Worker' B3=IF(COLUMN()-1<=SUMPRODUCT(--(Models<>"")),INDEX(Models,COLUMN()-1,1),"")
> > > > > and copy to right so all your models are displayed. > > > > > A4=IF(ISERROR(Workers),"",Workers) > > > > > and copy down so all your workers are displayed. B4=IF(OR($A4="",B$3=""),"",SUMPRODUCT(--(ProdDate=$A$2),--(ProdWorker=$A4),-
> > > > > -(ProdModel=B$3),(ProdQty))) > > > > > and copy it into table determined by workers and models headers. [quoted text clipped - 15 lines] > > > > > A2 - data validation lists source=Months, and format as Custom > "mmmm" B4=IF(OR($A4="";B$3=""),"",SUMPRODUCT(--(MONTH(ProdDate)=MONTH($A$2)),--(Pro
> > > > > dWorker=$A4),--(ProdModel=B$3),--(ProdQty))) > > > > > and copy it into table determined by workers and models headers. [quoted text clipped - 46 lines] > > > > > > thanks > > > > > > Nadeem Arvi Laanemets - 29 Oct 2004 09:17 GMT Hi
You can get my email address from signature - you have to replace <At> with @ there (I never enter my real mail address into NG-postingd anymore - I'm a bit late with this of-course, but at least for new spammers I can make some difficulties). The one used by automatic report - a mailbox on free mail server - is really configured as a spam-trap - all mail retrieved there is deleted immediately.
When you attach yor file, pack it before (preferably zip it) - otherwise it maybe isn't reaching me at all. And explain in your mail, what exactly do you want to do.
 Signature Arvi Laanemets (When sending e-mail, use address arvil<At>tarkon.ee)
> Hi Arvi, > Thank you very much for your answers on this thread. I wanted to adapt your [quoted text clipped - 3 lines] > real. My email add is: eserceker (AT) yahoo (DOT) com > Would you allow me to email it to your real email add? J_J - 29 Oct 2004 10:42 GMT Thanks Arvi, I'll do that. See you J_J
> Hi > [quoted text clipped - 22 lines] > > real. My email add is: eserceker (AT) yahoo (DOT) com > > Would you allow me to email it to your real email add? J_J - 31 Oct 2004 06:13 GMT Arvi, can you check your Inbox?. I've emailed you twice about receiving the wrong file with no answer.... Sicerely J_J
> Hi > [quoted text clipped - 22 lines] > > real. My email add is: eserceker (AT) yahoo (DOT) com > > Would you allow me to email it to your real email add? Arvi Laanemets - 31 Oct 2004 07:22 GMT Hi
I can't before tomorrow.
Arvi Laanemets.
> Arvi, can you check your Inbox?. I've emailed you twice about receiving the > wrong file with no answer.... [quoted text clipped - 32 lines] > > > real. My email add is: eserceker (AT) yahoo (DOT) com > > > Would you allow me to email it to your real email add? J_J - 31 Oct 2004 09:52 GMT OK. See you tomorrow then...:) Thanks for letting me know. Regards
> Hi > [quoted text clipped - 44 lines] > > > > real. My email add is: eserceker (AT) yahoo (DOT) com > > > > Would you allow me to email it to your real email add? Nadeem Shafiullah - 27 Oct 2004 03:09 GMT Many thanks many thanks Arvi.
> Hi everyone > [quoted text clipped - 15 lines] > thanks > Nadeem
|
|
|