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

[µo°Ý] ½Ð°Ý¦p¦ó¤À§O¼¶¼gVBA¡A¨Ï¯S©w¤u§@ªíªº¯S©w­È¦X¨Ö¡A¦A§ì¯S©w­È¦^­ì©lÀÉ

[µo°Ý] ½Ð°Ý¦p¦ó¤À§O¼¶¼gVBA¡A¨Ï¯S©w¤u§@ªíªº¯S©w­È¦X¨Ö¡A¦A§ì¯S©w­È¦^­ì©lÀÉ

¥»©«³Ì«á¥Ñ sax868 ©ó 2012-5-10 16:49 ½s¿è

Notes adding.zip (221.94 KB)

¦U¦ì°ª¤â¤j¤j¦n:

½Ð°Ý¥H¤U­n¦p¦ó¤À§O¼¶¼gVBA? ¦]¬°¤u§@ªí¤@¦@¦³¤@¦Ê¦h­Ó¡A¤Ñ¤Ñ¤â°Ê§ï¦A¾ã²z¸ê®Æ§Ö­ú¤F...«ô°U~±Ï§Ú!!!

1)
¦b³o­ÓÀɮ׸̫إߤ@­Ó·sªº¤u§@ªíºÙ¡¨Updated Data¡¨¥B¸ê®Æ¥þ¬O"­È"´N¦n¡A¥i¥H¤£­n¥]§t­ì¨Ó¸ÓÄæ¦ì¥i¯à¦³ªº¨ç¼Æ¶Ü?
AÄæ­È¬O¨C±i¤u§@ªíªº C1 (°£¤F¨â±i¤u§@ªí¥H¥~,¨ä¦WºÙ¬° ¡§DATA¡¨ ¤Î¡¨Currency¡¨), ¥BA1ªº­È¬O²Ä¤@±i¤u§@ªíªºB1
BÄæ­È¬O¨C±i¤u§@ªíªº C2 (°£¤F¨â±i¤u§@ªí¥H¥~,¨ä¦WºÙ¬° ¡§DATA¡¨ ¤Î¡¨Currency¡¨), ¥BB1ªº­È¬O²Ä¤@±i¤u§@ªíªºB2
CÄæ­È¬O¨C±i¤u§@ªíªº E1 (°£¤F¨â±i¤u§@ªí¥H¥~,¨ä¦WºÙ¬° ¡§DATA¡¨ ¤Î¡¨Currency¡¨), ¥BC1ªº­È¬O²Ä¤@±i¤u§@ªíªºD1
D1¨ìBE1ªº­È¬O²Ä¤@±i¤u§@ªíªºA11¨ìBB11
D2¨ìBE2 ¥H¤U¨ì©³³¡ªº­È¬O¨C¤@±iworksheet¸Ìªº A12¨ìBB12¨ì©³³¡ (°£¤F¨â±i¤u§@ªí¥H¥~,¨ä¦WºÙ¬° ¡§DATA¡¨ ¤Î¡¨Currency¡¨)

2)
¸Ó±i¤u§@ªíAI12¨ì©³³¡ªº­È¬O °²³] $A12¡B$J12 ¤Î¡¨©T©w$C$1¡¨ ¤TªÌªº­È»P ¡¨Updated Data¡¨ ¤u§@ªí¸ÌAÄæ DÄæ MÄæ ¤TªÌ¬Ò¬Û²Å®É«h­È¬°Updated Data¤u§@ªí¸ÌªºAKÄæ
(§Ú¦³¥Î¨ç¼Æ¼gIF(AND+AND+AND) ¤£¹L³o¦³®ÉÆF¥ú¦³®É¤£¦æ,¤]¤£ª¾¹D¬°¬Æ»ò...)

·P¿E¤£ºÉ!

®z¤k¤l¯d

  1. Sub SaveIt()
  2.     Msg = MsgBox("My Dear Friend¡AIt's been a while¡Aplease press YES to save file!" & Chr(13) _
  3.        & "¬O(Y)¡GSave File" & Chr(13) _
  4.        & "§_(N)¡GYou Are in Trouble." & Chr(13) _
  5.        & "¨ú®øCancel¡GYour Boss Is in Trouble.", vbYesNoCancel + 64, "Take a Break!")
  6. '´£¥Ü¥Î¤á«O¦s·í«e¬¡°Ê¤åÀÉ¡C
  7.     If Msg = vbYes Then Application.Run "OutputtoUpdatedDataI" Else If Msg = vbCancel Then Exit Sub
  8.     ActiveWorkbook.Save
  9.     ActiveWorkbook.Worksheets("Updated Data").Copy
  10.     ActiveWorkbook.Worksheets("Updated Data").SaveAs "D:\" & "Updated Data" & ".xlsx"
  11.     ActiveWorkbook.Worksheets("Updated Data").SaveAs "D:\Updated Data " & Date$ & ".xlsx"
  12.     Call runtimer '¦pªG¥Î¤á¨S¦³¿ï¾Ü¨ú®ø´N¦A¦¸½Õ¥Î Runtimer
  13. End Sub
½Æ»s¥N½X
¦^´_ 20# Hsieh
·d©w¤F!!
ÁÂÁ¶W¯Åª©¥Dªº«üÂI!³]©w¦n¤F«Ü¦n¥Î³á!¥Ñ©ó³o­Ó³Æ¥÷·|§â¦PÀÉ®×Âл\¤W¥h¡A¦³³\¦h¥®¥®¯Zªº¨Ï¥ÎªÌ¦@¦P¨Ï¥Î¸ÓÀÉ¡A©Ò¥H§Ú¤]¦b¥t¥~³]©wÀx¦s¤T­ÓÀÉ®×(1.­ìÀÉ¡B2.¥u¦³¸Ó¤u§@ªí¡B3.¥u¦³¸Ó¤u§@ªí+¤é´Á)¡A¤£¹L¦³1­Ó¤p°ÝÃD·Q³Â·Ð½Ð¶W¯Åª©³BÀ°§Ú¸Ñ¨M:
1. ¦s'¥u¦³¸Ó¤u§@ªí'¦b°õ¦æ«ü¥O®É·|¶}°_Àx¦s«á¦Û°ÊÃö³¬¡A¦ý'¥u¦³¸Ó¤u§@ªí+¤é´Á'³o­Ó¤£·|¡A½Ð°Ý­n«ç»ò¼Ë¤~¯à¨Ï2¡B3³Æ¥÷Àɳ£¦bÀx¦s«á¦Û°ÊÃö³¬©O? (§Ú¸Õ¤F´X­Ó¤èªk¦ý¤£ÆF¥ú...¦³§â3­ÓÀɳ£Ãö±¼¤]¦³3­ÓÀɳ£¶}°_¨S³QÃö±¼...-_-lll)

«ô°U±z¤F!!
ÁÂÁÂ!

®z¤k¤l¯d

TOP

¦^´_ 19# sax868
¦Ü©ó§A¾ãÅé¬yµ{§Ú¨Ã¤£²M·¡
¦Û°Ê¦sÀÉ¥i°Ñ¦Ò¤U­±³sµ²
¦Û­qApplicatoin¨Æ¥ó/ºÊ±±©Ò¦³¬¡­¶Ã¯/°µ¦¨¼W¯q¶°
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

_VALUE!2.rar (119.74 KB) ¦^´_ 17# Hsieh

¿Ë·Rªº¶W¯Åª©¥D±ß¦w¡G

¦]¬°³o­ÓÀɮ׳sµ²³\¦hÀɮסA¾á¤ß·|¦³¨ä¥L¨Ï¥ÎªÌ²¨©¿¨S¦sÀÉ¥H­P¿ò¥¢¸ê®Æ¡C§Ú·Q¤F¤@¨Ç¤èªk¥Î¤T¸}¿ß¥\¤Ò¼g¤F¤@®M§âÀɮצ۰ÊÀx¦sªºVBA(¸m©óModel3¸Ì)¡A¦ý¬O¤£ÆF¥ú¡AÁÙ±o³Â·Ð½Ð¶W¯Åª©¥DÀ°¦£­×§ï¾É¥¿¡G

AutoSaveNotes:½Ð°Ý¦p¦ó¥ÎVBA³]©w¦b¨C15¤ÀÄÁ¤ÎÃöÀÉ®×®É(³o­Ó§Ú¤£·|)·|¦Û°Ê¸õ¥Xµøµ¡­n¨D¦sÀɤ@¦¸ («ö¡¨¬O¡¨«á¡A¶]¸Ó¥ý«e³]¸mªº°Ê§@¤@¡A°£¤F­n¦s¦b¤u§@ªí¡¦Updated Data¡¦¸Ì(¥ý«e¬O¥t¶}±Ò¤@­ÓÀÉ®×¥¹µoı§Ç¸¹·|¸õ±N¨Ó¨S¿ìªk§ì¦^¥h¡A©Ò¥Hª½±µ¦s¦bUpdated Data¤u§@ªí¸Ì§Y¥i)¡A¨Ã¦Û°Ê¥t¦sÀÉ©ó¸ô®|C:\Users\JH\Downloads\¡A¨äÀɦW¬°¡GNotes¡^¡A¸Ó¦s¬°³æ¤@¤u§@ªí¤§¦WºÙ¥ç¬°'Updated Data'¡C

¥H¤W¡A«ô°U¶W¯Åª©¥D±Ï±Ï§Ú!!

ÁÂÁÂ~

²´·úªáªáªº
®z¤k¤l¯d

TOP

¦^´_ 17# Hsieh
¤Ó·P¿E±z¤F!!¥nÁ¶W¯Åª©¥DªºÀ°¦£!!


   
º¡¤ßÅw³ßªº
®z¤k¤l¯d

TOP

¥»©«³Ì«á¥Ñ Hsieh ©ó 2012-5-10 19:50 ½s¿è

¦^´_ 16# sax868
  1. Sub InputData()

  2. Dim Sh As Worksheet, Ar()

  3. Set d = CreateObject("Scripting.Dictionary")

  4. Set d1 = CreateObject("Scripting.Dictionary")


  5. With Sheets("Updated Data")

  6.    For Each a In .Range(.[A2], .Cells(.Rows.Count, 1).End(xlUp))

  7.     If a.Offset(, 49) <> "" Then d(a & a.Offset(, 3) & a.Offset(, 12)) = a.Offset(, 49).Value   'AX¦³­È¤~°õ¦æ

  8.     If a.Offset(, 37) <> "" Then d1(a & a.Offset(, 3) & a.Offset(, 12)) = a.Offset(, 37).Value   'AL¦³­È¤~°õ¦æ

  9.    Next

  10. End With

  11. For Each Sh In Sheets

  12. With Sh

  13.    r = 12

  14.    Do Until .Cells(r, 1) = ""

  15.          .Cells(r, "AU") = d(.[C1] & .Cells(r, "A") & .Cells(r, "J"))

  16.          .Cells(r, "AI") = d1(.[C1] & .Cells(r, "A") & .Cells(r, "J"))

  17.           r = r + 1

  18.    Loop

  19. End With

  20. Next

  21. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

#VALUE!.zip (131.44 KB) ¦^´_ 14# Hsieh

¿Ë·Rªº¶W¯Åª©¥D¤È¦w¡G

¯u¤£¦n·N«ä! ½Ð°Ý¦bInput Data³o­ÓVBA¤¤¯à¤£¯à¦b§ì²Å¦X³o¤T¼Æ­Èªº¦P®É¡A¨Ã»Ý'Updated Data'ALÄæ©ÎAXÄ榳­Èªº¤~§ìALÄæ©ÎAXÄ檺­È?
With Sheets("Updated Data")
    For Each a In .Range(.[A2], .Cells(.Rows.Count, 1).End(xlUp))
     d(a & a.Offset(, 3) & a.Offset(, 12)) = a.Offset(, 49).Value
     d1(a & a.Offset(, 3) & a.Offset(, 12)) = a.Offset(, 37).Value

¥Ø«e§Ú¹J¨ìªºª¬ªp¬O²Å¦X³o¤T¼Æ­Èªº¥i¯à¦³¦n´X¦C¡A¦ý¥u¦³¤@¦C¬O¦³Notes,
           Á|¨Ò(½Ð¬dªþ¥ó)¡G¤u§@ªí¡¥1008600-2013¡¦ ¦]¡¦Updated Data¡¨¸Ì²Å¦X³o¯S©w¤T¼Æ­Èªº(1008600+500+AA) ¦³¤T¦æ¦ý¶È¨ä¤¤¤@¦æ¦³Notes, ©Ò¥HVBA¶]¥X¨Óµª®×¬OªÅ¥Õ

²{¦b§Ú¯à·Q¨ìªº¬O¥ý§â³o¨ÇªÅ¥Õªº¤â°Ê§R°£«á¦A¶]InputData VBA§Y¥i¨D¥Xµª®×¡A°ÝÃD¬O³o¤@§R¦³¨Ç¸ê®Æ¦b¥þ³¡§ó·s«á´N§ä¤£¦^¨Ó¤F¡K·Q½Ð°Ý¯à¤£¯à³Â·Ð¶W¯Åª©¥DÀ°¦£¦h³]¤@­Ó±ø¥ó¡A¨Ï:
d(a & a.Offset(, 3) & a.Offset(, 12)) = a.Offset(, 49).Value ²Å¦X¥~¥BAXÄæ«DªÅ®æ
d1(a & a.Offset(, 3) & a.Offset(, 12)) = a.Offset(, 37).Value²Å¦X¥~¥BALÄæ«DªÅ®æ

·P¿E¤£ºÉ!!

¨S©Û¤Fªº
®z¤k¤l¯d:L

TOP

¦^´_ 14# Hsieh
§Ú·P°Ê¦a¤j­ú¤@³õ...
·PÁ¶W¯Åª©¥Dªº±Ï©R¤§®¦...Á`ºâ§Ú¥i¥H±q¾m­I¤S¦ÇÀY¤gÁy¨ì©ú¤Ñ®¼ª½¸y±ì¬¡µÛ¨«¶i¿ì¤½«Ç¤F!!
»¡¤£ºÉªº·P¿E!!!

TOP

¦^´_ 13# sax868
  1. Sub InputData()
  2. Dim Sh As Worksheet, Ar()
  3. Set d = CreateObject("Scripting.Dictionary") '³Ð«Ø¦r¨åª«¥óÀx¦s"Updated Data"¹ïÀ³ªº­È
  4. Set d1 = CreateObject("Scripting.Dictionary") '³Ð«Ø¦r¨åª«¥óÀx¦s"Updated Data"¹ïÀ³ªº­È

  5. With Sheets("Updated Data")
  6.    For Each a In .Range(.[A2], .Cells(.Rows.Count, 1).End(xlUp))
  7.      d(a & a.Offset(, 3) & a.Offset(, 12)) = a.Offset(, 49).Value '¥HA¡BD¡BM¬°¯Á¤Þ¦s¤JAXÄæ¦ìªº­È
  8.      d1(a & a.Offset(, 3) & a.Offset(, 12)) = a.Offset(, 37).Value '¥HA¡BD¡BM¬°¯Á¤Þ¦s¤JALÄæ¦ìªº­È
  9.    Next
  10. End With
  11. For Each Sh In Sheets
  12. With Sh
  13.    r = 12 '±q²Ä12¦C¥H¤U¶}©lŪ¤J¸ê®Æ¨ì°}¦C¤¤
  14.    Do Until .Cells(r, 1) = "" 'ª½¨ìAÄ欰ªÅ¥Õ¬°¤î
  15.          .Cells(r, "AU") = d(.[C1] & .Cells(r, "A") & .Cells(r, "J")) '±N¤u§@ªíªºAUÄæ¦ì¼g¤J¹ïÀ³ªºUpdated Data­È
  16.          .Cells(r, "AI") = d1(.[C1] & .Cells(r, "A") & .Cells(r, "J")) '±N¤u§@ªíªºAIÄæ¦ì¼g¤J¹ïÀ³ªºUpdated Data­È
  17.           r = r + 1 '¤U¤@¦C
  18.    Loop
  19. End With
  20. Next
  21. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 12# Hsieh

·PÁ¶W¯Åª©¥DªºÀ°¦£! «Ü©êºp¡A§Ú³o²V¶Ã¦aªí¹F¨SÅý±z¥ß§Y²M·¡©úÁA-_-lll
'Updated Data'¸ÌªºALÄ涷¹ïÀ³¨ì¨C¤@±i¤u§@ªíªº12¦C¥H¤U¤§AIÄæ¡A'Updated Data'¸ÌªºAXÄ涷¹ïÀ³¨ì¨C¤@±i¤u§@ªíªº12¦C¥H¤U¤§AUÄæ¡F¥ý«e°Ê§@¤@ªºVBA»P²{¦b­n§ìUpdated Data¸ÌªºAL/AX­È¦^¨C­Ó¤u§@ªíªºAI/AU¬°¤G­Ó¿W¥ß¤À¶}ªºVBA³á! (¦]¬°¬ðµMµo²{¥¦¶]¤F¤@¦¸¸ê®Æ)
¯u¤£¦n·N«ä¡A­n¦A³Â·Ð±z¤F!

¥®¥®¯Zªí¹F¯à¤O¤£¨Îªº
®z¤k¤l¯d

TOP

        ÀR«ä¦Û¦b : ¡i°±º¢¤£«e¡A²×µL©Ò±o¡j¤H³£°g©ó´M§ä©_ÂÝ¡A¦]¦Ó°±º¢¤£«e¡FÁa¨Ï®É¶¡¦A¦h¡B¸ô¦Aªø¡A¤]¤FµL¥Î³B¡A²×µL©Ò±o¡C
ªð¦^¦Cªí ¤W¤@¥DÃD