Tecnologia, programação e muito Visual FoxPro.

segunda-feira, 31 de janeiro de 2011

Re: ]] XL-mania [[ Transpose Data

 

mohon diteliti workbook terlampir


Private Sub summarize()
   ' siti Vi / 31 jan 2011
   ' ini bukan mentranspose tetapi men-summarize
   Dim n As Long, r As Long, c As Integer
   Dim D As Range, H As Range
   Dim Nama As String, Jenis As Range
  
   Set D = Range("A2").CurrentRegion
   Set H = Range("L6")
   Set Jenis = H(0, 2)
   Set Jenis = Range(Jenis, Jenis.End(xlToRight))
  
   For n = 2 To D.Rows.Count
      If D(n, 1) <> D(n - 1, 1) Then
         Nama = D(n, 1)
         r = r + 1
         H(r, 1) = Nama
      End If
      c = WorksheetFunction.Match(D(n, 2), Jenis, 0) + 1
      H(r, c) = D(n, 3)
   Next n
End Sub

ttapi daripada susah-susah nulis code spt itu; kita bisa menggunakan formula biasa
yg sudah sangat sering di tanyakan dan dijawab di milis ini

=SUMPRODUCT(($A$3:$A$20=$A24)*($B$3:$B$20=B$23)*($C$3:$C$20))




2011/1/27 Mody <mody@bni-life.co.id>
> Dear all,
> Mohon bantuan untuk kasus seperti pada data terlampir..
> Best Regard,
> Mody

__._,_.___
Recent Activity:
+-:: XL-mania ::::::::::::::::::::----------------------------------+
| "if you are the most valuable assets, you will show up on the     |
| balance sheet..." - oNo Wiqe                                      |
| http://www.facebook.com/group.php?gid=37671048001&ref=mf          |
+-------------------------------------------------------------------+
| DILARANG : MLM, money game, OOT, iklan tanpa izin, SARA, testing, |
| pembicaraan pribadi, one line message,  melecehkan,  tidak sopan. |
+-------------------------------------------------------------------+
| Buat subjek yang kreatif, jangan : "tanya", "help", "mohon bantu" |
| Usahakan besar attachment < 200 kb. Gunakan  winzip  jika  perlu. |
+-------------------------------------------------------------------+
| Ajak teman-teman Anda bergabung dengan mengirim e-mail kosong ke  |
| XL-mania-subscribe@yahoogroups.com atau kirimkan mereka file dari |
| http://groups.yahoo.com/group/XL-mania/files/Promotion/           |
+-------------------------------------------------------------------+
| Berikan testimoni di : http://www.friendster.com/xlmania atau...  |
| http://www.xl-mania.com/2008/06/testimoni-xl-mania.html           |
+-------------------------------------------------------------------+
| Message lama ada di :                                             |
| http://groups.yahoo.com/group/XL-mania/messages [perlu yahoo id]  |
| http://www.mail-archive.com/xl-mania@yahoogroups.com              |
+-------------------------------------------------------------------+
.

__,_._,___

Nenhum comentário:

Arquivo do blog