how to count all the qty in sheets and put it in master sheet

Hi All,

I have this spreadsheet (sample attached).

I have Mastersheet which contain all the location and the product quantities, now I have to split them in a separate sheet which will be taken by a counter person and key in numbers, now I want the some of A product to automatically calculated and put in the column counted_qty on the master sheet if it possible? can someone help, please.

Thank you.

Regards,

A
ammartahir1978Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
You forgot to upload the file.
0
ammartahir1978Author Commented:
sorry here is the file
Stocktake28122017WF.xlsx
0
ShumsExcel & VBA ExpertCommented:
Hi Ammar,

  1. Have the standard format of all your sheets which you gonna give your staff for counting, as attached...
  2. Add Sheet Names in P2 until last sheet name.
  3. Create a Dynamic Named Range for your sheets with this formula: =OFFSET(MasterSheet!$P$2, 0, 0, COUNT(IF(MasterSheet!$P$2:$P$100="", "", 1)), 1) and name as SheetNames.
  4. Add this formula in O2: =IFERROR(SUMPRODUCT(SUMIF(INDIRECT("'"&SheetNames&"'!"&"$C:$C"),$C2,INDIRECT("'"&SheetNames&"'!"&"$E:$E"))),"") and drag down until you need
  5. Try entering any count in any sheet for any product list, it will update Master Sheet as requested.
Check in attached...
Ammar_Tahir_Stocktake28122017WF.xlsx
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

ammartahir1978Author Commented:
Hi Shums,

thanks i will check and get back to you.
0
ammartahir1978Author Commented:
Hi Shum

is the sheetname not auto populated in mastersheet.
0
ShumsExcel & VBA ExpertCommented:
Here is another approach with below Array Formula, confirmed with Ctrl+Shift+Enter:
=IFERROR(VLOOKUP($C2,INDIRECT("'"&INDEX(SheetNames,MATCH(1,--(COUNTIF(INDIRECT("'"&SheetNames&"'!$C:$E"),$C2)>0),0))&"'!$C:$E"),3,FALSE),"")
Ammar_Tahir_Stocktake28122017WF_v2.xlsx
0
ShumsExcel & VBA ExpertCommented:
You need to create a NamedRange as SheetNames as I directed above
0
ammartahir1978Author Commented:
Hi Shum,

There is a bug in formula so i put 1000 units on counted qty for a product see below:

A-BB-01-A      5880064      108318      Worcester Greenstar HE Std     Telescopic Flue 7716 191 082      1000      

and when i filter it it shows following:

Location      Product      Des1      Current_Stock      Counted_quantity      Sheet Names
A-BB-01-A      108318      Worcester Greenstar HE Std     Telescopic Flue 7716 191 082      29      1000      
A-BB-01-A      108318      Worcester Greenstar HE Std     Telescopic Flue 7716 191 082      72      1000      
A-BB-02-A      108318      Worcester Greenstar HE Std     Telescopic Flue 7716 191 082      43      1000      
A-BB-02-A      108318      Worcester Greenstar HE Std     Telescopic Flue 7716 191 082      72      1000      
A-BB-18-F      108318      Worcester Greenstar HE Std     Telescopic Flue 7716 191 082      72      1000      
A-BB-19-B      108318      Worcester Greenstar HE Std     Telescopic Flue 7716 191 082      72      1000      
A-BB-20-E      108318      Worcester Greenstar HE Std     Telescopic Flue 7716 191 082      72      1000      
A-BB-21-B      108318      Worcester Greenstar HE Std     Telescopic Flue 7716 191 082      72      1000      
A-BB-21-E      108318      Worcester Greenstar HE Std     Telescopic Flue 7716 191 082      72      1000      
A-BB-23-C      108318      Worcester Greenstar HE Std     Telescopic Flue 7716 191 082      72      1000      
A-BB-23-D      108318      Worcester Greenstar HE Std     Telescopic Flue 7716 191 082      72      1000      
A-BB-26-D      108318      Worcester Greenstar HE Std     Telescopic Flue 7716 191 082      72      1000      
A-BB-30-E      108318      Worcester Greenstar HE Std     Telescopic Flue 7716 191 082      72      1000      
A-BB-31-E      108318      Worcester Greenstar HE Std     Telescopic Flue 7716 191 082      72      1000      
A-BB-32-B      108318      Worcester Greenstar HE Std     Telescopic Flue 7716 191 082      72      1000      
A-BB-42-D      108318      Worcester Greenstar HE Std     Telescopic Flue 7716 191 082      72      1000      
A-BB-51-D      108318      Worcester Greenstar HE Std     Telescopic Flue 7716 191 082      72      1000      
A-GG-39-E      108318      Worcester Greenstar HE Std     Telescopic Flue 7716 191 082      72      1000      
A-GG-53-F      108318      Worcester Greenstar HE Std     Telescopic Flue 7716 191 082      72      1000      


so 1000 is been entered every where.
0
ShumsExcel & VBA ExpertCommented:
Hi Ammar,

You can change previous formula with below:
=IF(COUNTIF($C$2:C2,C2)=1,SUMPRODUCT(SUMIF(INDIRECT("'"&SheetNames&"'!"&"$C:$C"),$C2,INDIRECT("'"&SheetNames&"'!"&"$E:$E"))),"")
Check in attached...
Ammar_Tahir_Stocktake28122017WF_v1.xlsx
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ammartahir1978Author Commented:
Excellent expert, very helpful
0
ShumsExcel & VBA ExpertCommented:
You're Welcome Ammar! Glad I was able to help you.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Office

From novice to tech pro — start learning today.