Tecnologia, programação e muito Visual FoxPro.

quinta-feira, 17 de novembro de 2011

Re: ]] XL-mania [[ Mengambil data dalam cell

 


Function TextToRows(S As String)
   '====haps, smg, nov 17, 2011 ===='
   ' konversi data string ke Number
   ' dlm arraySekolom
   ' courtesy of ctv collection
   '--------------------------------'
   Dim Dat, Ar(), t, i As Long, a As Long, b As Long
   
   ' mengkonversi ke string-tunggal ke beberapa data
   ' & string menjadi bilangan, data kosong di-ignored
   Dat = Split(S, Chr(10))
   For i = 0 To UBound(Dat)
      If Not Dat(i) = vbNullString Then
         a = a + 1
         ReDim Preserve Ar(1 To a)
         Ar(a) = CLng(Replace(Replace(Dat(i), ".", ""), ",", ""))
      End If
   Next i
   
   ' mengurutkan data (ascending)
   For i = 1 To UBound(Ar) - 1
      For b = UBound(Ar) To (i + 1) Step -1
         a = (b - 1)
         If Ar(a) > Ar(b) Then _
         t = Ar(b): Ar(b) = Ar(a): Ar(a) = t
      Next b
   Next i
   TextToRows = WorksheetFunction.Transpose(Ar)
End Function

sintaks penulisan di sheet: sebagai array formula multi hasil
(ditulis sekaligus dlm beberapa cells sekolom)
=TextToRows(A1)



2011/11/15 Iksan Bondang <xanbondang@yahoo.co.id>
> Para pakar Excel yang baik hti...
> Bagaimanakah cara mengambil data dalam cell menjadi perbaris
> seperti contoh terlampir.
> Mohon maaf bila pertanyaan ini sudah pernah dibuat.
> Terima kasih

__._,_.___
Recent Activity:
+-:: XL-mania ::::::::::::::::::::----------------------------------+
| ayooo... coba cari XL-mania di linkedin.com                       |
| selamat merayakan idul adha!                                      |
+-------------------------------------------------------------------+
| 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              |
+-------------------------------------------------------------------+
MARKETPLACE

Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.

.

__,_._,___

Nenhum comentário:

Arquivo do blog