masih meminjam sheet dari pak ricky;
siti usul makro spt ini
Private Sub CommandButton2_Click()
' siti Vi / 14 feb 2010
'-----------------------
Dim rCell As Range
For Each rCell In Range("D2:D10")
rCell(1, 5).NumberFormat = "General"
rCell(1, 5) = Val(Replace(rCell, ",", "."))
Next
' siti Vi / 14 feb 2010
'-----------
Dim rCell As Range
For Each rCell In Range("D2:D10"
rCell(1, 5).NumberFormat = "General"
rCell(1, 5) = Val(Replace(
Next
End Sub
'setting di pc: TandaPemisahDesimal = TITIK
----- Original Message -----From: Riky YonathanSent: Sunday, February 14, 2010 9:06 AMSubject: Re: ]] XL-mania [[ Convert text to number (copy paste)Dear Mas AfanCoba dgn Macro ini mas.+++++++++++++++++++++ +++++++++ +++++++++ ++++ Private Sub CommandButton1_Click()
Dim rng As Range
Dim rCell As RangeSet rng = Range("D2:D10")
rng.CopyRange("F2").Select
Selection.PasteSpecial Paste:=xlPasteValue s
For Each rCell In Selection
rCell = CDec(rCell)
rCell.NumberFormat = "General"
Next
Application.CutCopyMode = False
End Sub
+++++++++++++++++++++ +++++++++ +++++++++ ++++ Saya mencoba mengkonvertnya dengan fungsi CDecThanks Riky----- Original Message -----From: ZASLI AFANDI BTo: XL ManiaSent: Friday, February 12, 2010 4:48 PMSubject: ]] XL-mania [[ Convert text to number (copy paste)Hallo para xl-mania
Saya mempunyai ,masalah saat mengcopy dan paste data.
Sebelumnya data tersebut hanya menggunakan tada titik sebagai penanda koma. Sehingga saya replace dengan tenda koma.
Akan tetapi masalah terjadi ketika saya meng copy data tersebut ke workbook lain (pake makro), data tersebut dibaca sebagai text, (see attachment)
Yang saya ingin tanyakan adalah, bagaimana cara sehingga, saat data tersebut saya paste maka disimpan dalam angka bukan teks
Sub COPY_DATA()
SOURCE_DATA = ActiveWorkbook.Name ActiveWorkbook.
FILE_NAME = Application.GetOpenFilename( "Excel Files (*.xls), *.xls", , "Buka File Tujuan", , False)
DEST_BOOK =Name
Windows(SOURCE_DATA).Activate
Range("A10:P10").Select Windows(DEST_
' misalnya angka yang ingin saya paste di kolom B, pada kolom selainnya berisi data text
Range(Selection, Selection.End(xlDown)). Select
Selection.CopyBOOK).Activate End Sub
Sheets("Sheet2").Select
Cells(B, 1).Select
Selection.PasteSpecial Paste:=xlPasteValue s, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
__._,_.___
+-:: XL-mania ::::::::::::::::::::----------------------------------+
| Happy Valentine's Day! Gong Xi Fat Choi! Jangan lupa kiriman |
| coklatnya buat momods... kekekekekeke.... |
| 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 |
+-------------------------------------------------------------------+
| Happy Valentine's Day! Gong Xi Fat Choi! Jangan lupa kiriman |
| coklatnya buat momods... kekekekekeke.... |
| 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:
Postar um comentário