Hi Richard

just a suggestion - Why don't u consolidate/ merge all the input sheets to
single then create a simple pivot table for ur analysis

below macro will merge data from multiple sheets to single you might have
to do minor changes so that it meets your requirement


Sub merge1()
Dim i As Long, z As Long
' add new sheet at last and name it merge
Sheets.Add After:=Sheets(Sheets.Count)
Sheets(Sheets.Count).Name = "Merge"
For i = 1 To Sheets.Count - 1
' add headers from first sheet
If i = 1 Then
' find last filled row in the sheet
z = Sheets(i).Range("a1048576").End(xlUp).Row
' paste the data on the merge sheet
Sheets(i).Rows("1:" & z).Copy Destination:=Sheets("Merge").Range("a1")
Else
' find last filled row in the sheet
z = Sheets(i).Range("a1048576").End(xlUp).Row
' paste the data on the merge sheet
Sheets(i).Rows("2:" & z).Copy Destination:=Sheets("Merge").Range("a" &
Sheets("Merge").Range("a1048576").End(xlUp).Row + 1)
End If
Next
End Sub
.

Regards
Ashish


On Fri, Jan 25, 2013 at 12:58 AM, Richard Bridges <lrb4...@gmail.com> wrote:

> Hi guys,
>
> I'm having trouble writing a couple subs.  I'm new to vba, so what I'm
> asking for may be very complicated.  If so, I apologize.  I've attached a
> sample .xslm file which I'll be referencing throughout this post.  So what
> I'm trying to do is use the workbook as a tool to simplify ordering.
>  People will send in their order sheets, seen in the sample as sheets 3, 4,
> and 5, which will be pasted into the master workbook.  There are three
> sheets in this example, but there could be more or less on any given day,
> so the code would need to take into account a variable number of
> worksheets.  Components are categorized based on the recipe in which they
> are used, so component 1 in recipe 1 may differ from component 1 in recipe
> 2.  What I would like is to identify components in each sheet that need to
> be ordered (I was thinking an If...Then loop for values <> 0 in column F)
> and transfer all values in their rows over to the AllOrders sheet.  I would
> like to then compile all the orders by component onto the TotalComponentry
> sheet (perhaps by matching strings or equating strings in column A? does
> vba even have an object for this?), and sum the values of their respective
> 'order this much' cell.  I'm not even sure where to start, so any help
> would be appreciated.  Thanks in advance.
>
> Richard
>
> --
> Join official Facebook page of this forum @
> https://www.facebook.com/discussexcel
>
> FORUM RULES
>
> 1) Use concise, accurate thread titles. Poor thread titles, like Please
> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
> will not get quick attention or may not be answered.
> 2) Don't post a question in the thread of another member.
> 3) Don't post questions regarding breaking or bypassing any security
> measure.
> 4) Acknowledge the responses you receive, good or bad.
> 5) Jobs posting is not allowed.
> 6) Sharing copyrighted material and their links is not allowed.
>
> NOTE : Don't ever post confidential data in a workbook. Forum owners and
> members are not responsible for any loss.
> ---
> You received this message because you are subscribed to the Google Groups
> "MS EXCEL AND VBA MACROS" group.
> To post to this group, send email to excel-macros@googlegroups.com.
> To unsubscribe from this group, send email to
> excel-macros+unsubscr...@googlegroups.com.
> Visit this group at http://groups.google.com/group/excel-macros?hl=en.
>
>
>



-- 
*Regards*
* *
*Ashish Koul*


*Visit*
*My Excel Blog <http://www.excelvbamacros.com/>*
Like Us on 
Facebook<http://www.facebook.com/pages/Excel-VBA-Codes-Macros/151803898222297>
Join Us on Facebook <http://www.facebook.com/groups/163491717053198/>


P Before printing, think about the environment.

-- 
Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To post to this group, send email to excel-macros@googlegroups.com.
To unsubscribe from this group, send email to 
excel-macros+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros?hl=en.


Attachment: sample_macro.xlsm
Description: Binary data

Reply via email to