Thread: Is it possible?
View Single Post
  #13   Report Post  
Posted to microsoft.public.excel.programming
Soo Cheon Jheong Soo Cheon Jheong is offline
external usenet poster
 
Posts: 14
Default Is it possible?

James,
Try:

' Tabel 1 = Sheet1
' Tabel 2 = Sheet2


'Module1:
'---------------------------------------------------------------------------
Sub Summary_2()

R = Worksheets("Sheet2").Range("A1:D1").CurrentRegion. Rows.Count
If R < 2 Then Exit Sub

With Worksheets("Sheet1")
.Range("A:C").ClearContents
.Range("A1:C1").Value = Array("Start_Date", "Course", "Duration")
.Range("A2:A" & R).Formula =
"=INDEX(Sheet2!$A$1:$D$1,MATCH(B2,Sheet2!A2:D2,0)) "
.Range("B2:B" & R).Formula =
"=INDEX(Sheet2!A2:D2,MATCH(""*?*"",Sheet2!A2:D2,0) )"
.Range("C2:C" & R).Formula = "=COUNTIF(Sheet2!$A$2:$D$6,B2)"
.Range("A2:C" & R).Value = .Range("A2:C" & R).Value
End With

End Sub


--
Regards,
Soo Cheon Jheong
Seoul, Korea
_ _
^вп^
--