Tecnologia, programação e muito Visual FoxPro.

quinta-feira, 25 de agosto de 2011

Re: ]] XL-mania [[ Loop yg berulang

 

Coba pakai ini
Sub Jum()
' Jum
' penjumlahan biasa
NumberRow = Range("a1").SpecialCells(xlLastCell).Row
nrc = 0
    Do
    If IsEmpty(ActiveCell) Then
   
      ActiveCell.FormulaR1C1 = "=sum(RC[-1],RC[-2])"
      If ActiveCell.Value = 0 Then
        ActiveCell.Value = ""
      End If
           
    End If
    ActiveCell.Offset(1, 0).Select
    nrc = nrc + 1
    Loop Until nr = nrc
End Sub


From: Novan Dwiascahyo <novan.dwiascahyo@leighton.co.id>
To: "XL-mania@yahoogroups.com" <XL-mania@yahoogroups.com>
Sent: Thursday, August 25, 2011 2:47 PM
Subject: ]] XL-mania [[ Loop yg berulang

 
Dear XL-mania,
 
Mohon bantuannya memperbaiki formula macro yg menggunakan Do.. Loop, sehingga proses penghitungan data dapat berlangsung kontinyu hanya dengan sekali running macro dan baru akan berhenti setelah menghitung data yg paling bawah.
 
Perintah yg saya gunakan adalah sbb:
 
Sub sum()
' sum
' penjumlahan biasa
    Do
    If IsEmpty(ActiveCell) Then
        If IsEmpty(ActiveCell.Offset(0, -1)) And IsEmpty(ActiveCell.Offset(0, -2)) Then
            ActiveCell.Value = ""
        Else
            ActiveCell.FormulaR1C1 = "=sum(RC[-1],RC[-2])"
        End If
    End If
    ActiveCell.Offset(1, 0).Select
    Loop Until IsEmpty(ActiveCell.Offset(-1, -1))
End Sub
 
Kasus lengkapnya mohon disimak file terlampir. Thanks berat.
 
Note: Ini postingan ke-2 (dgn sedikit edit) karena postingan yg pertama sepertinya tidak sampai dengan slamet.
 
Salam,
ND
 

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________


__._,_.___
Recent Activity:
+-:: XL-mania ::::::::::::::::::::----------------------------------+
| jangan lupa sebelum libur:                                        |
| - add XL-mania di linkedin www.linkedin.com/company/xl-mania      |
| - pesan buku "mengapa boss benci chart anda"  :D :D :D            |
+-------------------------------------------------------------------+
| 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
A bad score is 596. A good idea is checking yours at freecreditscore.com.
.

__,_._,___

Nenhum comentário:

Arquivo do blog