I am working on a multipage excel workbook for creating cutlists for the cabinet door industry. I have reached a stumbling block that I can't seem to think my way around. I want to create a macro which will take the automatically generated values in a number of cells, combine ones with identical values while summing the total number of parts that size and type, and then sort the list in order of size. The second problem is an easy one I know but I can't figure out if the first one is possible to achieve.
it would be listed like this:
# size type
4 135 rail
2 710 stile
6 135 rail
12 710 stile
4 135 stile
I would like it automatically to combine the values to list them like this:
# size type
14 710 stile
10 135 rail
4 135 stile
Any help? This workbook will be used to enter our orders to create production cutlists. It will enter many orders daily, as such the time required in data entry is a concern. So far all of the values are figured automatically based on the entry for a given door size requiring no extra calculations. I would like to keep it that way if possible using a custom macro or by purchasing an add-on.
Any advice would be much appreciated.
Hi
How's this
ryloSub bbb() Range("B:C").AdvancedFilter Action:=xlFilterCopy, copytorange:=Range("F1:G1"), unique:=True Range("E1").Value = Range("A1").Value lastrow = Cells(Rows.Count, 1).End(xlUp).Row Range("E2").Formula = "=SUMPRODUCT(--($B$2:$B$" & lastrow & "=F2),--($C$2:$C$" & lastrow & "=G2),($A$2:$A$" & lastrow & "))" Range("E2").AutoFill Destination:=Range("E2:E" & Cells(Rows.Count, "F").End(xlUp).Row) Range("E:G").Sort key1:=Range("E1"), order1:=xlDescending, key2:=Range("G1"), Header:=xlYes End Sub
robinrobo,
Welcome to the Excel Forum.
You did not describe where your raw data is (rows and columns).
Try the below workbook and the macro.
Detach/open workbook CombineSort ADVFU BC FG SumIfs - robinrobo - EF813232 - SDG12.xlsm and rum macro CombineSort.
To fine tune the macro, please attach a workbook with actual raw data. Also, where would you like the restuls to be (what range)?
To attach your workbook, scroll down and click on the Go Advanced button, then scroll down and click on the Manage Attachments button.
Have a great day,
Stan
stanleydgromjr
Windows Vista Business, Excel 2003 and 2007
If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.
This is the workbook in question.
The idea is that door sizes will be entered on the first sheet and the values for the various components will be calculated on the others. I need to sort them that way so that the machine operators can cut orders efficiently.
An example of what I am attempting to achieve is that on the DoorToPanel sheet I want from A9:AA9 to stay together as a row but be sorted by column C and E from largest to smallest all the way down to A116:AA116. I can move the formulas that I already have in those cells to the margins if necessary to populate them another way correctly.
Another example is that on the Framestock sheet I need to keep rows A9:E9 together all the way down to A224:E224 and combine the entries for equal valued components of the same type (rails, stiles, frames etc.) and sort from largest to smallest in column C. There are other ways I need to sort other sheets but that is the gist of it.
I appreciate the help so far!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks