ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
Excel                  2
  (                )
      2012/02/16
Excel¥Þ¥¯¥í 2
MyMacro.xlsm   Del_LF_TAB
Dim i As Integer, j As Integer
Dim rowNum As Integer
Dim ORG As String

rowNum = Range("A65536").End(xlUp).Row


                   A

   End(xlUp).Row
   (https://www.moug.net/tech/exvba/0050088.html)
For i = 1 To 2
 For j = 1 To rowNum
  ORG = ActiveSheet.Cells(j, i).Value
  ORG = Replace(ORG, vbTab, " ")
  ORG = Replace(ORG, vbCrLf, " ")
  ActiveSheet.Cells(j, i).Value = _
  Replace(ORG, Chr(10), " ")
 Next j
Next i


   i     (1       2   =A&B   )   J   (1
   rowNum     )
For i = 1 To 2
 For j = 1 To rowNum
  ORG = ActiveSheet.Cells(j, i).Value
  ORG = Replace(ORG, vbTab, " ")
  ORG = Replace(ORG, vbCrLf, " ")
  ActiveSheet.Cells(j, i).Value = _
  Replace(ORG, Chr(10), " ")
 Next j
Next i

   Cells(j,i)      String

   Replace      vbTab   vbCrLf   Chr(10)
                Cells(i,j)
VBA              (                 )
vbTab
Chr(9)


vbCrLf
Chr(13) + Chr(10)


vbLf
Chr(10)


http://www.red.oit-net.jp/tatsuya/vb/fixed.htm
Replace




VBA    Replace   F1
Replace


http://officetanaka.net/excel/vba/
function/replace.htm
A      B

A

vbTab

vbCrLf

vbLf
MyMacro.xlsm   SplitString
(Const)
A
A
InStrRev         schar
Left       Mid      InStrRev       B
C                              D
InStrRev




 : if pos = 0
Left
Mid
InStr
http://www.eurus.dti.ne.jp/yoneyama/
Excel/vba/function/vba_string.html

http://www.eurus.dti.ne.jp/yoneyama/
Excel/vba/function/vba_string2.html
?

http://officetanaka.net/excel/vba/
function/
Excel¥Þ¥¯¥í 2
sample.xlsm          A              ¡¯?¡¯
          (sheet1)       (sheet2)
      :


      /
Excel¥Þ¥¯¥í 2
MyMacro.xlsm

More Related Content

Excel¥Þ¥¯¥í 2

Editor's Notes