Thread
:
Combining multiple data records
View Single Post
#
4
Posted to microsoft.public.excel.misc
Don Guillett
external usenet poster
Posts: 10,124
Combining multiple data records
I tested in a REGULAR module with the macro assigned to a shape.
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"Compass Rose" wrote in message
...
Thanks for your effort, Don. Where do I place this code? Do I right click
on
the sheet tab, View Code and paste it into the code wondow? Will the
Unique
List automatically update when I enter new daily production data into the
spreadsheet, or do I have to manually run the macro?
David
"Don Guillett" wrote:
This should do it. Correct for your sheets and ranges and WORDWRAP.
Sub makeUNIQUEList()
Columns("g:k").ClearContents
Range("B1").Copy Range("G1")
Range("B1:B9").AdvancedFilter Action:=xlFilterInPlace, _
CriteriaRange:=Range("G1:G2"), Unique:=True
Range("B1:B9").Copy Range("G1")
Application.CutCopyMode = False
ActiveSheet.ShowAllData
'findpartNUM
'End Sub
'uncomment lines to make 2 separate macros
'Sub findpartNUM()
lr = Cells(Rows.Count, "g").End(xlUp).Row
For Each pn In Range("g2:g" & lr)
With Worksheets("sheet33").Range("b1:b" & Cells(Rows.Count,
"b").End(xlUp).Row)
Set C = .Find(pn, LookIn:=xlValues, lookat:=xlWhole)
If Not C Is Nothing Then
firstAddress = C.Address
Do
If UCase(Application.Trim(Cells(C.Row, "C"))) = "X" Then Cells(pn.Row,
"H")
= Cells(C.Row, "a")
If UCase(Application.Trim(Cells(C.Row, "D"))) = "X" Then Cells(pn.Row,
"I")
= Cells(C.Row, "a")
If UCase(Application.Trim(Cells(C.Row, "E"))) = "X" Then Cells(pn.Row,
"J")
= Cells(C.Row, "a")
Set C = .FindNext(C)
Loop While Not C Is Nothing And C.Address < firstAddress
End If
End With
Next pn
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"Compass Rose" wrote in message
...
I posted this to Worksheet Functions and got no response, hence the post
here.
I receive daily production reports for the manufacturing of our
products
that
have to go through 3 manufacturing stations. I enter the information
into
a
spreadsheet in the following format. The 'X' indicates that the part
number
went through the manufacturing station on that day.
Date Part # Stn A Stn B Stn C
6/23 10506 X
6/23 10602 X X
6/23 20506 X
6/23 30904 X
6/24 10506 X X
6/24 10602 X
6/24 30904 X
6/24 10805 X
etc....
I would like to summarize the data on a separate worksheet as follows:
Part # Stn A Stn B Stn C
10506 6/23 6/24 6/24
10602 6/23 6/23 6/24
20506 6/23
30904 6/23 6/24
10805 6/24
etc....
How can this summary table be created? Can it change dynamically as
more
data is added to the daily table?
TIA
David
Reply With Quote
Don Guillett
View Public Profile
Find all posts by Don Guillett