Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
one wb with several sheets containing a template for each product
Each template has three columns item#(empty rows) description(several rows)and required quantity(empty rows). Description contains several rows. This is a key factor Since description is general you need to keyin the part# in the required item. Example Screws are a general description but to order a screw you have to look at the price list (the last sheet ) and pick the correct screw and keyin the the item# and required quantity. So, after you fill each template with the required items; you end up with a list in each worksheet with partially completed lines. Completed lines are lines that have the THREE fields Filled. I need to create a summary sheet that contains ONLY the filled lines so I can perform a Pivot Table on the filled lines. Can you help me out |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim sh as Worksheet
Dim rng1 as Range Dim rws as Long for each sh in thisworkbook.worksheets if lcase(sh.name) < "price list" and lcase(sh.Name) < "summary" then if application.CountA(sh.Range("A2:C2")) = 3 then rws = sh.Range(Sh.Range("B2"), _ Sh.Range("B2").End(xldown)).rows.count if rws 4 then rws = 1 sh.Range("A2").Resize(rws,3).copy _ Destination:=worksheets("Summary").Cells( _ rows.count,2).End(xlup)(2,0) end if end if Next -- Regards, Tom Ogilvy "Arishy" wrote in message ups.com... one wb with several sheets containing a template for each product Each template has three columns item#(empty rows) description(several rows)and required quantity(empty rows). Description contains several rows. This is a key factor Since description is general you need to keyin the part# in the required item. Example Screws are a general description but to order a screw you have to look at the price list (the last sheet ) and pick the correct screw and keyin the the item# and required quantity. So, after you fill each template with the required items; you end up with a list in each worksheet with partially completed lines. Completed lines are lines that have the THREE fields Filled. I need to create a summary sheet that contains ONLY the filled lines so I can perform a Pivot Table on the filled lines. Can you help me out |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() A worm thank you for pointing me to the right direction. You will not believe it, there was no single error It ran first time Mr Genius. "if application.CountA(sh.Range("A2:C2")) = 3 then" It did not keep going to the rest of the sheet I ran it on test data I only got the first line from each sheet. The looping did not continue after A2. I believe you picked 4 as an arbitrary max for column B where the description of all items available for this product reside. Can I change that to say 20 ( Max Possible for Column B) You resized the range based on B2 while if you do it on column A you will get number of rows I need to loop to finish each sheet. This of course if I understand your logic. Of course I will keep going but a chat will help a long way *** Sent via Developersdex http://www.developersdex.com *** |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I enter formula sum(range+range)*0.15 sumif(range=3) | Excel Discussion (Misc queries) | |||
Excel Addin:Setting the range to the Excel.Range object range prop | Excel Worksheet Functions | |||
Range Question / error 1004: method Range of object Worksheet has failed | Excel Programming | |||
Range.Find returns cell outside of range when range set to single cell | Excel Programming | |||
how to? set my range= my UDF argument (range vs. value in range) [advanced?] | Excel Programming |