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

½Ð°Ý­n¦p¦ó§âA1¡BA2¡BA3¦X¨Ö¦Ü C1, ¤å¦r¤º®e¦r«¬¡BÃC¦â¤£ÅÜ¡C

½Ð°Ý­n¦p¦ó§âA1¡BA2¡BA3¦X¨Ö¦Ü C1, ¤å¦r¤º®e¦r«¬¡BÃC¦â¤£ÅÜ¡C

¦U¦ì¦n:
½Ð°Ý­n¦p¦ó§âA1¡BA2¡BA3¦X¨Ö¦Ü C1, ¤å¦r¤º®e¦r«¬¡BÃC¦â¤£ÅÜ¡C
VBA ­n¦p¦ó½s¼g
SUB TEST()
[C1]=[A1]&[A2]&[A3]
END SUB
©ÒÅã¥Ü¤§µ²ªG¥u¦³¦r¦ê¤§¦X¨Ö¡AÃC¦âÄݩʬҧïÅÜ¡C
oiggu

¦^´_ 1# oiggu
  1. Sub Ex()
  2.     Dim R As Range, i As Integer, ii As Integer
  3.     [C1].Clear
  4.     [C1] = Join(Application.WorksheetFunction.Transpose([A1:A3]), Chr(10))
  5.     i = 1
  6.     For Each R In [A1:A3]
  7.         For ii = 1 To Len(R)
  8.             With R.Characters(Start:=ii, Length:=1).Font
  9.                 [C1].Characters(Start:=i, Length:=1).Font.Name = .Name
  10.                 [C1].Characters(Start:=i, Length:=1).Font.FontStyle = .FontStyle
  11.                 [C1].Characters(Start:=i, Length:=1).Font.Size = .Size
  12.                 [C1].Characters(Start:=i, Length:=1).Font.Strikethrough = .Strikethrough
  13.                 [C1].Characters(Start:=i, Length:=1).Font.Superscript = .Superscript
  14.                 [C1].Characters(Start:=i, Length:=1).Font.Subscript = .Subscript
  15.                 [C1].Characters(Start:=i, Length:=1).Font.OutlineFont = .OutlineFont
  16.                 [C1].Characters(Start:=i, Length:=1).Font.Shadow = .Shadow
  17.                 [C1].Characters(Start:=i, Length:=1).Font.Underline = .Underline
  18.                 [C1].Characters(Start:=i, Length:=1).Font.ColorIndex = .ColorIndex
  19.             End With
  20.             i = i + 1
  21.         Next
  22.         i = i + 1
  23.     Next
  24. End Sub
½Æ»s¥N½X

TOP

¦^´_ 2# GBKEE
¤]¥i¥H²¤Æ¦¨¥H¤U³o¼Ë :
  1. Sub Ex()
  2.     Dim R As Range, i As Integer, ii As Integer
  3.     Dim fS As Font, fT As Font
  4.     [C1].Clear
  5.     [C1] = Join(Application.WorksheetFunction.Transpose([A1:A3]), Chr(10))
  6.     i = 1
  7.     For Each R In [A1:A3]
  8.         For ii = 1 To Len(R)
  9.             Set fS = R.Characters(Start:=ii, Length:=1).Font
  10.             Set fT = [C1].Characters(Start:=i, Length:=1).Font
  11.             With fS
  12.                 fT.Name = .Name
  13.                 fT.FontStyle = .FontStyle
  14.                 fT.Size = .Size
  15.                 fT.Strikethrough = .Strikethrough
  16.                 fT.Superscript = .Superscript
  17.                 fT.Subscript = .Subscript
  18.                 fT.OutlineFont = .OutlineFont
  19.                 fT.Shadow = .Shadow
  20.                 fT.Underline = .Underline
  21.                 fT.ColorIndex = .ColorIndex
  22.             End With
  23.             i = i + 1
  24.         Next
  25.         i = i + 1
  26.     Next
  27. End Sub
½Æ»s¥N½X

TOP

ÁÂÁ GBKEE¡B luhpro ¥\¤O¤Ó±j¤F¡A¸g´ú¸Õ³£¥i¨Ï¥Î¡C
oiggu

TOP

        ÀR«ä¦Û¦b : ¤Hªº²´·úªø¦b«e­±¡A¥u¬Ý¨ì§O¤Hªº¯ÊÂI¡Aµ·²@¬Ý¤£¨ì¦Û¤vªº¯ÊÂI¡C
ªð¦^¦Cªí ¤W¤@¥DÃD