ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

²M°£½d³ò¤ºÀx¦s®æ¤å¦r«e«á¦h¥XªºªÅ®æ

²M°£½d³ò¤ºÀx¦s®æ¤å¦r«e«á¦h¥XªºªÅ®æ

¦p¦ó¨Ï¥ÎTRIM ¤½¦¡¤@¦¸¹L±N½d³òa1:e10 ¤ºªºÀx¦s®æ¤º¤å¦r«e«á¦h¥XªÅ®æ§R°£
½Ð°Ý¦b¨º¸Ì¥X¿ù©O?
½Ð«ü±Ð

Sub TEST()
Dim REF As Object
Set REF = Range("a1")
'³]©wÄæ¼Æ
For Col = 1 To 5
'³]©w¦æ¼Æ
For Row = 1 To 10
REF = Trim(REF)
Set REF = REF.Offset(1, 0)
Next Row
'­«³]ROW ¬°²Ä¤@¦æ¤Î¦V¥k¹L¤@Äæ
Set REF = REF.Offset(-5, 1)
Next Col
End Sub

¦^´_ 1# enoch
  1. Sub TEST()
  2.     Dim REF As Object, Row As Integer, Col As Integer
  3.     Set REF = Range("a1")
  4.     For Col = 1 To 5    '³]©wÄæ¼Æ
  5.         For Row = 1 To 10    '³]©w¦æ¼Æ
  6.             REF.Cells(Row, Col) = Trim(REF.Cells(Row, Col))
  7.         Next
  8.     Next
  9. End Sub
½Æ»s¥N½X

TOP

¦hÁ«ü±Ð, ËݮͲ¼ä

TOP

        ÀR«ä¦Û¦b : °µ¸Ó°µªº¨Æ¬O´¼¼z¡A°µ¤£¸Ó°µªº¨Æ¬O·Mè¡C
ªð¦^¦Cªí ¤W¤@¥DÃD