Tecnologia, programação e muito Visual FoxPro.

quarta-feira, 17 de março de 2010

Re: ]] XL-mania [[ modify macro

 

Lepi,

Sepertinya kalau excel jadinya dilampirkan bisa lebih membantu deh. Pusing juga kalau lihat kode aja tanpa tahu hasil akhirnya seperti apa.


--- On Tue, 3/16/10, l3p15 <mr.fahlevi@gmail.com> wrote:

From: l3p15 <mr.fahlevi@gmail.com>
Subject: ]] XL-mania [[ modify macro
To: XL-mania@yahoogroups.com
Date: Tuesday, March 16, 2010, 7:04 AM

 

RR,

Salam kenal RR XL-mania,
Saya masih newbie banget di milist maupun di XL application ini dan skrg lagi mencoba belajar membuat looping buat macro sederhana guna menunjang kerjaan sekaligus mendalami excel appl.

saya punya macro manual spt ini yg sangat statis dan skrg saya mencoba untuk menggantinya dengan looping.

Sub Define_ExtGsmCell( )
'
' Define_ExtGsmCell Macro
' parsing
'
' Keyboard Shortcut: Ctrl+a
'
ActiveCell.FormulaR 1C1 = "= ""cr RncFunction= 1,ExternalGsmNet work=1,ExternalG smCell="" &input!R[ 1]C[1]"
Range("A2"). Select
ActiveCell.FormulaR 1C1 = "= input!RC&"" #cell id"""
Range("A3"). Select
ActiveCell.FormulaR 1C1 = "= input!R[-1]C[ 3]&"" #ncc"""
Range("A4"). Select
ActiveCell.FormulaR 1C1 = "= input!R[-2]C[ 4]&"" #bcc"""
Range("A5"). Select
ActiveCell.FormulaR 1C1 = "= input!R[-3]C[ 5]&"" #bcchfrequency" ""
Range("A6"). Select
ActiveCell.FormulaR 1C1 = "= input!R[-4]C[ 6]&"" #lac"""
Range("A1"). Select
Selection.Copy
Range("A7"). Select
ActiveSheet. Paste
Application. CutCopyMode = False
ActiveCell.FormulaR 1C1 = "= ""cr RncFunction= 1,ExternalGsmNet work=1,ExternalG smCell="" &input!R[ -4]C[1]"
Range("A2"). Select
Selection.Copy
Range("A8"). Select
ActiveSheet. Paste
Application. CutCopyMode = False
ActiveCell.FormulaR 1C1 = "= input!R[-5]C& "" #cell id"""
Range("A3"). Select
Selection.Copy
Range("A9"). Select
ActiveSheet. Paste
Application. CutCopyMode = False
ActiveCell.FormulaR 1C1 = "= input!R[-6]C[ 3]&"" #ncc"""
Range("A4"). Select
Selection.Copy
Range("A10") .Select
ActiveSheet. Paste
Application. CutCopyMode = False
ActiveCell.FormulaR 1C1 = "= input!R[-7]C[ 4]&"" #bcc"""
Range("A5"). Select
Selection.Copy
Range("A11") .Select
ActiveSheet. Paste
Application. CutCopyMode = False
ActiveCell.FormulaR 1C1 = "= input!R[-8]C[ 5]&"" #bcchfrequency" ""
Range("A6"). Select
Selection.Copy
Range("A12") .Select
ActiveSheet. Paste
Application. CutCopyMode = False
ActiveCell.FormulaR 1C1 = "= input!R[-9]C[ 6]&"" #lac"""
Range("A7"). Select
Selection.Copy
Range("A13") .Select
ActiveSheet. Paste
Application. CutCopyMode = False
ActiveCell.FormulaR 1C1 = "= ""cr RncFunction= 1,ExternalGsmNet work=1,ExternalG smCell="" &input!R[ -9]C[1]"
Range("A8"). Select
Selection.Copy
Range("A14") .Select
ActiveSheet. Paste
Application. CutCopyMode = False
ActiveCell.FormulaR 1C1 = "= input!R[-10] C&"" #cell id"""
Range("A9"). Select
Selection.Copy
Range("A15") .Select
ActiveSheet. Paste
Application. CutCopyMode = False
ActiveCell.FormulaR 1C1 = "= input!R[-11] C[3]&"" #ncc"""
Range("A10") .Select
Selection.Copy
Range("A16") .Select
ActiveSheet. Paste
Application. CutCopyMode = False
ActiveCell.FormulaR 1C1 = "= input!R[-12] C[4]&"" #bcc"""
Range("A11") .Select
Selection.Copy
Range("A17") .Select
ActiveSheet. Paste
Application. CutCopyMode = False
ActiveCell.FormulaR 1C1 = "= input!R[-13] C[5]&"" #bcchfrequency" ""
Range("A12") .Select
Selection.Copy
Range("A18") .Select
ActiveSheet. Paste
Application. CutCopyMode = False
ActiveCell.FormulaR 1C1 = "= input!R[-14] C[6]&"" #lac"""

dst.. sampai .. End Sub

.... saya mencoba untuk menganti dengan looping tetapi selalu gagal..

terima kasih buat RR yg bisa kasih masukan biar data yg di olah menjadi variabel dan juga macronya sendiri lebih dinamis.

Salam

Lepi


__._,_.___
Recent Activity:
+-:: XL-mania ::::::::::::::::::::----------------------------------+
| momods pecas ndaheeee... :( :( :(                                 | 
| 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