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

Ãö©ó¶Ç¦^¤é´Áªº°ÝÃD

Ãö©ó¶Ç¦^¤é´Áªº°ÝÃD

¦³½Ð¦U¦ì°ª¤â¤j¤j­ÌÀ°¦£
¦bA1´¡¤J¤@¦C¨Ã¥HA2¶}©l
¶Ç¦^¹ïÀ³©óB2ªº¤é´Á¬O¤@¦~¤¤ªº²Ä´X¶g
ÁÂÁÂ Book1.rar (15.04 KB)

¦^´_ 1# f3202

ª½±µ¦bRow 3 §e²{
Sub wk()
    For Each dd In Range([B1], [B1].End(xlToRight))
        Cells(3, dd.Column) = Format(dd, "ww", vbMonday, vbFirstFullWeek)
    Next
End Sub

»yªk»¡©ú: Format(expression[, format[, firstdayofweek[, firstweekofyear]]])
firstdayofweek - ©w¸q¬P´Á´X¬O¤@©Pªº¶}©l
firstweekofyear -  ©w¸q²Ä¤@©Pªº±ø¥ó
³o¨â°Ñ¼Æ¤§³]©w·|¼vÅTµ²ªG³á¡A½Ð°Ñ¦Ò "Excel Help"»¡©ú

TOP

¦^´_ 1# f3202
  1. Sub nn()
  2. If [A2] <> "" Then Rows(2).Insert
  3. For Each a In Range([B1], [B1].End(xlToRight))
  4.    a.Offset(1, 0) = DatePart("ww", a)
  5. Next
  6. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

ÁÂÁÂ victorl ¤j¤j
¦³¤p¤p¥X¤J
¯à§_¥ý¦bA1´¡¤J¤@¦C
µM«á¦bA2¶}©lÅã¥Ü¶g¼Æ
ÁÙ¬O·PÁ±z

TOP

¦^´_  f3202
Hsieh µoªí©ó 2010-6-12 15:59


ÁÂÁ Hsieh ª©¥D
°õ¦æ®É¦b " a.Offset(1, 0) = DatePart("ww", a)"
¥X²{
°õ¦æ¶¥¬q¿ù»~'5':
µ{¦¡©I¥s©Î¤Þ¼Æ¤£¥¿½T
·Ð½Ðª©¥D¤F ÁÂÁÂ

TOP

·Ó§AªºÀɮקڰõ¦æ¨S°ÝÃD
§AÀ³¸Ó¬O¦b²Ä¤@¦Cªº­È¬O«D¤é´Á²£¥Í¿ù»~
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

ÁÂÁ Hsieh ª©¥D

²Ä¤@¦Cªº­ÈÀ³¬O¤é´Á®æ¦¡
¦pA2 Åܧó®æ¦¡¦¨¬°5¤ë21¤é
°õ¦æ SUB NN
§Úªºµ{¦¡¦b²Ä¤G¦C´¡¤J¤@¦C
µM«á´N¥X²{¦P¼Ë°ÝÃD
¦³³Òª©¥D¤F ÁÂÁÂ

TOP

Dear Hsieh,
°õ¦æ«á´¡¤Jªº²Ä¤G¦C®æ¦¡¬°¤é´Á®æ¦¡¡A¦p¤U¡G
¥N½X\¤é´Á        2010/5/21        2010/5/20        2010/5/19
        1900/1/21        1900/1/21        1900/1/21
1101        25.95        26.75        27.1

¤â°Ê±N²Ä¤G¦C®æ¦¡³]©w¦¨³q¥Î¡A«hOK¡A¦p¤U¡G
¥N½X\¤é´Á        2010/5/21        2010/5/20        2010/5/19
        21        21        21
1101        25.95        26.75        27.1

·PÁª©¥D¤À¨É

TOP

¦^´_ 8# b9208
  1. Sub nn()
  2. If [A2] <> "" Then Rows(2).Insert
  3. Rows(2).NumberFormat = "0"
  4. For Each a In Range([B1], [B1].End(xlToRight))
  5.    a.Offset(1, 0) = DatePart("ww", a)
  6. Next
  7. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¥»©«³Ì«á¥Ñ Hsieh ©ó 2010-6-13 20:47 ½s¿è

¦^´_ 7# f3202


    ³o¸òA2®æ¦¡¨SÃö«Y§a!
²Ä2¦C´¡¤J«á·|©µÄò²Ä¤@¦C®æ¦¡
³Ì¥D­n¬O§A²Ä¤@¦Cªº¸ê®Æ­n½T©w¬O¤é´Á¸ê®Æ¤~¦æ
°õ¦æ«á¬O¤U¦C©Ò¥Ü
¥N½X\¤é´Á        5¤ë21¤é        5¤ë20¤é        5¤ë19¤é        5¤ë18¤é        5¤ë17¤é        5¤ë14¤é
        21        21        21        21        21        20
1101        25.95        26.75        27.1        26.45        26.3        26.9
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

        ÀR«ä¦Û¦b : ¦³¤ß´N¦³ºÖ¡A¦³Ä@´N¦³¤O¡A¦Û³yºÖ¥Ð¡A¦Û±oºÖ½t¡C
ªð¦^¦Cªí ¤W¤@¥DÃD