ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

§ì¨ú¸ê®Æ¤p°ÝÃD

§ì¨ú¸ê®Æ¤p°ÝÃD

Dear¤j¤j­Ì¡G

§Úªº­ì©l¸ê®Æ¦bsheet1¡A·Q±qsheet1§ì¸ê®Æ¡A§¹¦¨sheet2

sheet2!B2=SUMPRODUCT((Sheet1!$A:$A=$A2)*(Sheet1!$C:$C=B$1),(Sheet1!$E:$E))
³o¬O§Ú¥Îªº¤½¦¡¡A½Ð¤£­n©¹¤U©ì¦²¡A¨t²Î·|¾×±¼
½Ð°Ý¦³¿ìªk­×§ï¦¨¨ä¥L¤½¦¡¡AÅý¥¦­pºâ¤W¤£·|·í±¼
©Î¥Îvba
·PÁÂ

§ì¨ú¸ê®Æ¤p°ÝÃD.zip (184.45 KB)

Dear¤j¤j­Ì¡G

§Úªº­ì©l¸ê®Æ¦bsheet1¡A·Q±qsheet1§ì¸ê®Æ¡A§¹¦¨sheet2

sheet2!B2=SUMPRODUCT((Sheet1!$ ...
jj369963 µoªí©ó 2014-9-17 22:11

¥Î VBA ¤ñ¸û²³æ:
  1. Private Sub Workbook_Open()
  2.   Dim iCol%
  3.   Dim lRow&
  4.   Dim sStr$
  5.   Dim vD
  6.   
  7.   Set vD = CreateObject("Scripting.Dictionary")
  8.   lRow = 2
  9.   With Sheets("Sheet1")
  10.     Do While .Cells(lRow, 1) <> ""
  11.       sStr = .Cells(lRow, 1) & "_" & .Cells(lRow, 3)
  12.       vD(sStr) = vD(sStr) + .Cells(lRow, 5)
  13.       lRow = lRow + 1
  14.     Loop
  15.   End With
  16.   
  17.   lRow = 2
  18.   With Sheets("Sheet2")
  19.      Do While .Cells(lRow, 1) <> ""
  20.        For iCol = 2 To 7
  21.          sStr = .Cells(lRow, 1) & "_" & .Cells(1, iCol)
  22.          .Cells(lRow, iCol) = vD(sStr)
  23.        Next
  24.        lRow = lRow + 1
  25.      Loop
  26.   End With
  27. End Sub
½Æ»s¥N½X

TOP

¦^´_ 1# jj369963
­pºâ½d³òªº°ÝÃD
B2=SUMPRODUCT((OFFSET(Sheet1!$A$1,,,COUNTA(Sheet1!$A:$A),)=$A2)*(OFFSET(Sheet1!$C$1,,,COUNTA(Sheet1!$A:$A),)=B$1),OFFSET(Sheet1!$E$1,,,COUNTA(Sheet1!$A:$A),))
¦V¥k¦V¤U½Æ»s
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 1# jj369963


    =SUMIFS(Sheet1!$E:$E,Sheet1!$A:$A,$A2,Sheet1!$C:$C,B$1)
{...} ªí¥Ü»Ý­n¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡

TOP

¦^´_ 1# jj369963

¦pªG¬O³æµ§¹ïÀ³Ãö«Y®É¡A¥ý¥ÎMATCH§ä¨ì²Ä¤@µ§¸ê®Æ¦A¥ÎCOLUMN(A:A)­p¼Æ¼W¥[¡A·|¤ñSUMPRODUCT§Ö«Ü¦h
=N(OFFSET(Sheet1!$E$1,MATCH($A2,Sheet1!$A:$A,)-1+COLUMN(A:A)-1,))
¥k©Ô¤U©Ô
{...} ªí¥Ü»Ý­n¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡

TOP

¦A¥J²Ó¬Ý¡A§A³o¸ê®Æ¬O³æÄæÂର6Äæ¡Aª½±µ¥Î¼Æ¾Ç¤è¦¡­pºâ·|§ó§Ö
=N(OFFSET(Sheet1!$E$1,MATCH($A2,Sheet1!$A:$A,)-1+COLUMN(A:A)-1,))
¥k©Ô¤U©Ô

·íµMÁÙ¦³§ó§Öªºªº¤è¦¡¡A±Ä¥Î¶ôª¬¸ê®Æ§ì¤J¤è¦¡
B2:G2 =TRANSPOSE(OFFSET(Sheet1!$E$2,MAX(ROW()-2)*6,,6))
°}¦C¿é¤J¤è¦¡(CTRL+SHIFT+ENTER¤TÁä»ô«ö¤è¦¡¿é¤J¤½¦¡)
¦¹¤è¦¡¿é¤J³Â·Ð¡B­×§ï³Â·Ð¡A¤£¼ô´N²¤¹L§a!
{...} ªí¥Ü»Ý­n¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡

TOP

        ÀR«ä¦Û¦b : ¬O«D·í±Ð¨|¡AÆg¬ü§@ĵ±§¡C
ªð¦^¦Cªí ¤W¤@¥DÃD