¸ê®ÆåªR(TextToColumns)¹ï¶H¥i¥H¤£¬OÀx¦s®æ¶Ü?
- ©«¤l
- 41
- ¥DÃD
- 11
- ºëµØ
- 0
- ¿n¤À
- 83
- ÂI¦W
- 0
- §@·~¨t²Î
- windows
- ³nÅ骩¥»
- xp
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2012-12-20
- ³Ì«áµn¿ý
- 2019-12-17
|
¸ê®ÆåªR(TextToColumns)¹ï¶H¥i¥H¤£¬OÀx¦s®æ¶Ü?
½Ð±Ð¦U¦ì«e½ú
Selection.TextToColumns
¨ä¤¤Selection¦ü¥G¤@©wn¬Orange¡A¨º¦³¿ìªkª½±µ¹ï°}¦CÅܼƶi¦æ¸ê®ÆåªR¶Ü?
ex:dim A(3) as double
A(0)="1,2,3"
·Q¤£³z¹Lsheet§â¸ê®ÆåªR¦¨A(1)=2¡BA(2)=2¡BA(3)=3
¦³¿ìªk³o¼Ë°µ¶Ü?
ÁÂÁÂ |
|
|
|
|
|
|
- ©«¤l
- 41
- ¥DÃD
- 11
- ºëµØ
- 0
- ¿n¤À
- 83
- ÂI¦W
- 0
- §@·~¨t²Î
- windows
- ³nÅ骩¥»
- xp
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2012-12-20
- ³Ì«áµn¿ý
- 2019-12-17
|
¨Ò¦pt = 6
if ªº®ÉÔ
if (t<="10") then....
·|Åܦ¨
if ("6"<="10") then....
¦Ó¤£¬O
if (6<=10) then....
kimbal µoªí©ó 2013-2-16 17:07
ÁÂÁ¦U¦ì«e½ú¡A§Ú¾é¸Ñ¤F!
¦ý¦ü¥G¤@¨B¤@¨B°õ¦æµ{¦¡¡A¦bIf t <= 10¸òIf t <= "10"¤¤tªº«¬ºA³£ÁÙ¬Ovariant/Integer¡A¥i¬O¹ê»Ú¤W¦bIf t <= "10"®ÉVBA¬O¥Îvariant/String¥h§PÂ_?- Sub test()
- Dim t As Variant
- For t = 1 To 10
- If t <= 10 Then MsgBox t & " <= 10"
- If t <= "10" Then MsgBox t & " <= 10"
- Next t
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 472
- ¥DÃD
- 5
- ºëµØ
- 0
- ¿n¤À
- 485
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows
- ³nÅ骩¥»
- MS Office
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- »´ä
- µù¥U®É¶¡
- 2010-7-4
- ³Ì«áµn¿ý
- 2014-12-28
|
¦^´_ GBKEE
ÁÂÁÂG¤j¡A·s¦~§Ö¼Ö¡A
¹Ï¤¤Variant/Integer¤£¬O¥Nªí¦¹Åܼƥثe¬OIntegerªºª¬ºA¶Ü ...
chiata µoªí©ó 2013-2-9 16:23
t ¬O variant/Integer ¬O¹ïªº.
¦ý¬O·í ¦bif ªº®ÉÔ
¦]¬°¥k¤è "10" ¬O ¤å¦r, ¤£¬O¼Æ¦r, if·|§âtÂର¤å¦r¦A¹ï¤ñ (VBA¨Ó¬Ý, " "¸Ìªº¬O¤å¦r)
¨Ò¦pt = 6
if ªº®ÉÔ
if (t<="10") then....
·|Åܦ¨
if ("6"<="10") then....
¦Ó¤£¬O
if (6<=10) then....
¦Ó¤å¦r"6" ²Ä1Ó¦r §Y "6" ¤ñ "10"ªº²Ä1Ó¦r "1" ¤j
´«¥y¸Ü»¡ "6"<="10" ´N¬Oµ¥©óFALSE
TESTn³o¼Ë¼g¤~¥i¥H±o¥X®ÄªG- Option Explicit '±j¨î»Ý«Å§iÅܼÆ
- Sub test()
- Dim t As Integer
- For t = 1 To 110
- If t <= 15 Then MsgBox t
- Next t
- End Sub
- Sub test2()
- Dim t As Variant
- For t = 1 To 110
- If t <= 15 Then MsgBox t & " <= 10"
- Next t
- End Sub
½Æ»s¥N½X ¤£«ü©úÃþ«¬,¬O·|¤ñ¸û¤è«K¨Ç, ¦ý¬O·|¼W¥[¹³³o¼Ëªº¿ù»~¾÷·|.
·L³nªñ¦~¨Ó¹ïVariantªº¤è°w¤]¬OÅܨÓÅÜ¥h. |
|
|
|
|
|
|
- ©«¤l
- 41
- ¥DÃD
- 11
- ºëµØ
- 0
- ¿n¤À
- 83
- ÂI¦W
- 0
- §@·~¨t²Î
- windows
- ³nÅ骩¥»
- xp
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2012-12-20
- ³Ì«áµn¿ý
- 2019-12-17
|
¦^´_ 9# GBKEE
ÁÂÁÂG¤j¡A·s¦~§Ö¼Ö¡A
¹Ï¤¤Variant/Integer¤£¬O¥Nªí¦¹Åܼƥثe¬OIntegerªºª¬ºA¶Ü¡H
§Ú¥H¬°Variant¬O¥ý°ð«ü©wÅܼƫ¬ºA¡A«Ýµ{¦¡°õ¦æ«á·|¦Û°Ê§PÂ_¦¹ÅܼƦX¾A«¬ºA¡A¨Ò¦pinteger¡Bstring...µ¥¡A¨Ï¥Î¤W¤ñ¸û¦³¼u©Ê¡C
ÁÙ¬O§ÚÆ[©À¿ù»~¡H¡H |
|
|
|
|
|
|
- ©«¤l
- 41
- ¥DÃD
- 11
- ºëµØ
- 0
- ¿n¤À
- 83
- ÂI¦W
- 0
- §@·~¨t²Î
- windows
- ³nÅ骩¥»
- xp
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2012-12-20
- ³Ì«áµn¿ý
- 2019-12-17
|
¦^´_ 7# GBKEE - Sub test()
- For t = 1 To 110
- If t <= "10" Then MsgBox t
- Next t
-
- End Sub
- Sub test2()
- For t = 1 To 110
- If t <= Val("10") Then MsgBox t
- Next t
-
- End Sub
½Æ»s¥N½X ¤p§Ì¹J¨ìªº°ÝÃD...test¥u¦³t=1¸ò10·|¸õmsgbox¥X¨Ó¡Atest2´Nt=1~10³£·|¸õ¡A¤£ª¾¹D¬OþÃä¥X°ÝÃD...
ÁÂÁÂ |
|
|
|
|
|
|
- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¥»©«³Ì«á¥Ñ GBKEE ©ó 2013-2-5 16:37 ½s¿è
¦^´_ 6# chiata
¨Ï¥Îµo²{¦r¦ê¥i¥H¹Bºâ¡A¦ý¤£¯à°µ<¡B=¡B>µ¥§PÂ_- Option Explicit
- Sub Ex()
- Dim A As String, B As Variant
- A = "A5"
- B = "10"
- ' MsgBox A * B '** VBA ¶Ç¦^: ¿ù»~È13 "«¬ºA¤£²Å¦X"
- If IsNumeric(A) And IsNumeric(B) Then MsgBox A * B Else MsgBox "«¬ºA¤£²Å¦X"
- A = "5"
- B = "10"
- If IsNumeric(A) And IsNumeric(B) Then MsgBox A * B Else MsgBox "«¬ºA¤£²Å¦X"
- A = "1,2,3,4,5,6,7,8,9,10"
- B = Split(A, ",")
- MsgBox B(0) * B(UBound(B))
- MsgBox B(0) < B(UBound(B)) '1 < 10 =True
- MsgBox B(0) > B(UBound(B)) '1 > 10 =False
- MsgBox B(0) = B(UBound(B)) '1 = 10 =False
- A = "1,2,3,4,5,6,7,8,9,A10"
- B = Split(A, ",")
- MsgBox B(0) * B(UBound(B)) '** VBA ¶Ç¦^: ¿ù»~È13 "«¬ºA¤£²Å¦X"
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 41
- ¥DÃD
- 11
- ºëµØ
- 0
- ¿n¤À
- 83
- ÂI¦W
- 0
- §@·~¨t²Î
- windows
- ³nÅ骩¥»
- xp
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2012-12-20
- ³Ì«áµn¿ý
- 2019-12-17
|
¦^´_ 5# Hsieh
ÁÂÁ¡A§Ú²z¸Ñ¤F!
èè¨Ï¥Îµo²{¦r¦ê¥i¥H¹Bºâ¡A¦ý¤£¯à°µ<¡B=¡B>µ¥§PÂ_¡A¥u¯àn§PÂ_®É¨Ï¥Îval©Î¬O¹³H¤j©Ò»¡ªº¦s¦¨¥t¤@Ó°}¦C¨Ó¨Ï¥Î¡C |
|
|
|
|
|
|