Tecnologia, programação e muito Visual FoxPro.

sábado, 27 de agosto de 2011

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

 

coba juga, (mohon dites kecepatannya)

Sub Sumi()
    'anton suryadi, 27/Agt/2011
    'mengisi cell dengan formula hanya pada baris yang kosong/ blank (Microsoft Office Excel 2007)
    Dim r As Range
    ActiveSheet.AutoFilterMode = False
    x = Cells(Rows.Count, 1).End(xlUp).Row
    Set r = Cells(1, 1).Resize(x, 1)
    With r
        .AutoFilter 1, "<>"
        .Offset(1, 2).Resize(x - 1, 1).FormulaR1C1 = "=SUM(RC[-2]:RC[-1])"
    End With
    ActiveSheet.AutoFilterMode = False
End Sub


>semoga bermanfaat



--- In XL-mania@yahoogroups.com, Novan Dwiascahyo <novan.dwiascahyo@...> wrote:
>
> 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 598. A bad idea is not checking yours, at freecreditscore.com.
.

__,_._,___

Nenhum comentário:

Arquivo do blog