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

[µo°Ý] ¦³µL¿ìªkÅý¦r¦êÂର¹ï¶Hªº¤èªk

µLªk§ä¨ì¦r²Å

¥»©«³Ì«á¥Ñ Hsieh ©ó 2014-6-16 09:34 ½s¿è

[a1]=YEAR(TODAY()) - 1911&"/06/08"
´À´« & ¬° abc
[a1].Replace "&", "abc"
[a1].Replace chr(38), "abc"
³£§ä¤£¨ì &
& ¸ò " ´À´«©Î³Q´À´«³£¦³°ÝÃD,¦p¦ó§â¥¦·í¦¨¤@¯ëªº¦r??
¬Ý¥H¤U³o½g¤å³¹¡AÁÙ¬OµL¸Ñ.............
http://support.microsoft.com/kb/147687/zh-tw

TOP

¦^´_ 1# t8899

Àx¦s®æªºReplace¤èªk¡A¬O¹ï¤å¦r¤º®e¨ú¥N¡A¨Ã«D¹ï¤½¦¡¤º®e§@¨ú¥N
­nÅý¤½¦¡§ïÅÜ¥i¨Ï¥Î¨ú¥X¤½¦¡¦r¦ê¡A¦A¨Ï¥ÎReplace¨ç¼Æ§@¦r¦ê¨ú¥N¡AµM«á¦A¼g¤JÀx¦s®æ
¤£¹L¦]¬°§A¨ú¥Nªº¦r¦ê·|³y¦¨¤½¦¡¿ù»~ªº¸Ü¡A¦b¼g¤J®É´N·|¥X¿ù
[A1] = Replace([A1].Formula, "&", "abc")
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¥»©«³Ì«á¥Ñ t8899 ©ó 2014-6-16 12:20 ½s¿è
¦^´_  t8899

Àx¦s®æªºReplace¤èªk¡A¬O¹ï¤å¦r¤º®e¨ú¥N¡A¨Ã«D¹ï¤½¦¡¤º®e§@¨ú¥N
­nÅý¤½¦¡§ïÅÜ¥i¨Ï¥Î¨ú¥X¤½ ...
Hsieh µoªí©ó 2014-6-16 09:55


[a1]=YEAR(TODAY()) - 1911&"/06/08"
¦pªG§Ú§ï¬° ´À´« &"/06/08" (§Y&«á­±ªº¦r¥þ´À´«) ¬° +10  (³o¼Ë§ï«á¤½¦¡¬O¥¿½Tªº,µª®×¬°113)


[a1]=Replace([A1].Formula, "&"/06/08"", "+10")
¥X²{ »yªk¿ù»~ ??
---------------------------------------------------
­ì1¼Ó§Ú·Q¨ìªº¥t¥~¤èªk¬O
[a1]=YEAR(TODAY()) - 1911&"/06/08"  '¨D ´À´« & ¬° abc  
DIM A,B,C,D,E
D = InStr([a1].Formula, Chr(38)) '&¦b¥ªÃä²Ä´X¦r,§Y&¥ªÃä¦@´X¦r(§t&)
A = Left([a1].Formula, D - 1) '¦©±¼& ¡A¨ú&¥ªÃä³Ñ¤Uªº¦r
B = Len([a1].Formula) ' ¥þ³¡ªº¦r¼Æ
C = B - D '& ¥kÃ䪺¦r¼Æ
E = Right([a1].Formula, C) '¥kÃ䪺¦r
[a25].Formula = A & "ABC" & E  '<==='µª®× & ¥¢¥h§@¥Î((Á|¨Ò¤£·í,´À´««á¤½¦¡¿ù»~,ÅÞ¿è¹ï(¤T­Ó­Ó§O¥N¤J³£¹ï))

TOP

¦^´_ 3# t8899


   
[a1]=YEAR(TODAY()) - 1911&"/06/08"
¦pªG§Ú§ï¬° ´À´« &"/06/08" (§Y&«á­±ªº¦r¥þ´À´«) ¬° +10  (³o¼Ë§ï«á¤½¦¡¬O¥¿½Tªº,µª®×¬°113)
  1. Sub Ex()
  2.     With Range("A1")
  3.         .FormulaR1C1 = "=YEAR(TODAY()) - 1911&""/06/08"""
  4.         [A2] = Mid(.Formula, 1, InStr(.Formula, "&") - 1) & " + 10"
  5.     End With
  6. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¥»©«³Ì«á¥Ñ t8899 ©ó 2014-6-16 14:37 ½s¿è
¦^´_  t8899
GBKEE µoªí©ó 2014-6-16 13:33

                ­ì¨Ó     =YEAR(TODAY()) - 1911&"/06/08"
.FormulaR1C1 = "=YEAR(TODAY()) - 1911&"/06/08""   <===¤Þ¨ì¤½¦¡¦]¸Ó¬O
.FormulaR1C1 = "=YEAR(TODAY()) - 1911&""/06/08"""  ¬°¦ó©ñ¨ìµ{¦¡µøµ¡·|¦Û°Ê¦h¥[¤Þ¸¹??

ª½±µ§ìÀx¦s®æ¸Ìªº­È¨S°ÝÃD
  [A2] = Mid(Range("A1").Formula, 1, InStr(Range("A1").Formula, "&") - 1) & " + 10"

TOP

§äÀx¦s®æªº¦r°µ³B²z

§äAÄ檺©Ò¦³³æ¤¸®æ¸Ì­±ªº¦r¡A
1.°²¦p¦³ & ¦¹¦r«h§R°£¦¹¦r
2.°²¦p¦³ & ¦¹¦r«h´À´«¬°""
3.°²¦p¦³ & ¦¹¦r«h¦b¦¹¦rªº«e­±¥[""
³o¤T±¡ªp¡Aµ{§ÇÀ³¦p¦ó¼g??(Àx¦s®æ¥]§t¤½¦¡)

TOP

¥»©«³Ì«á¥Ñ p212 ©ó 2014-6-17 08:59 ½s¿è

¦^´_ 1# t8899
°²³]Àx¦s®æA1­È¬°¡u¥Ò&¦¹¦r¡v
Q1.°²¦p¦³ & ¦¹¦r«h§R°£¦¹¦r
       A1: Àx¦s®æB1¤½¦¡¿é¤J=SUBSTITUTE(A1,"¦¹¦r","")¡Aµ²ªG¬°¡u¥Ò&¡v¡C
Q2.°²¦p¦³ & ¦¹¦r«h´À´«¬°""
       A2: Àx¦s®æB1¤½¦¡¿é¤J=SUBSTITUTE(A1,"¦¹¦r",CHAR(34)&CHAR(34))¡Aµ²ªG¬°¡u¥Ò&""¡v¡C
Q3.°²¦p¦³ & ¦¹¦r«h¦b¦¹¦rªº«e­±¥[""
       A3: Àx¦s®æB1¤½¦¡¿é¤J=SUBSTITUTE(A1,"¦¹¦r",CHAR(34)&CHAR(34)&"¦¹¦r")¡Aµ²ªG¬°¡u¥Ò&""¦¹¦r¡v¡C
CHAR(34)¨ç¼Æ¦^´_µ²ªG¬°¡u"¡v
½Ð°Ñ¦Ò¡I

TOP

¦^´_  t8899
°²³]Àx¦s®æA1­È¬°¡u¥Ò&¦¹¦r¡v
Q1.°²¦p¦³ & ¦¹¦r«h§R°£¦¹¦r
       A1: Àx¦s®æB1¤½¦¡¿é¤J=S ...
p212 µoªí©ó 2014-6-17 08:56


ÁÂÁÂ!§Ú·Qª¾¹Dªº¬OVBªº»yªk (¦¹°Ï¬Oµ{¦¡°Ï)

TOP

[µo°Ý] ¦³µL¿ìªkÅý¦r¦êÂର¹ï¶Hªº¤èªk

±N[A10]¸Ìªº²Ä¤T¦r§R°£ (¤£­n¥ÎREPLACE,¥ÎDELETEÄÝ©Ê)
Sub MA3333()
DIM D
SET d = Mid([A10], 3, 1) '«¬ºA¤£²Å¦X, ,¦³µL¿ìªkÅý¦r¦êÂର¹ï¶Hªº¤èªk
  d.Delete
End Sub

¥»©«³Ì«á¥Ñ GBKEE ©ó 2014-6-18 07:10 ½s¿è

¦^´_ 5# t8899
.FormulaR1C1 = "=YEAR(TODAY()) - 1911&""/06/08"""
³oÂù¤Þ¸¹¤º¬OVBAµ{¦¡½Xªº¤å¦rªí¥Ü,
¤u§@ªí¤W¤½¦¡ªº¤å¦r¤]¬OÂù¤Þ¸¹ªí¥Ü.
VBAµ{¦¡½X¦b¤u§@ªí¤W¤½¦¡ªº¤å¦r,¥Î¨â­ÓÂù¤Þ¸¹ ªí¥Ü¬°¤½¦¡¤Wªº "
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : µoµÊ®ð¬Oµu¼ÈªºµoºÆ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD