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

[µo°Ý] ½Ð°Ý¦³µL¯«¤H¥iÀ°¸Ñ¨M³o®æ¦¡¤Æ±ø¥óªº°ÝÃD

[µo°Ý] ½Ð°Ý¦³µL¯«¤H¥iÀ°¸Ñ¨M³o®æ¦¡¤Æ±ø¥óªº°ÝÃD

¥»©«³Ì«á¥Ñ hank10459 ©ó 2014-3-3 12:07 ½s¿è

¦U¦ì EXCEL¯«¤H±z¦n¡A·Q½Ð°Ý§Ú²{¦b°µ³o­Ó¹Ï¡A¦pªG¤À¬°2­Ó¬¡­¶(03BAY»P04(05)BAY)¡A·í04BAY¦³¸ê®Æ®É¡A03BAYªº¹ïÀ³¦ì¸mÅܦ¨¥´¤@­Ó¤j¤e¤e¡A¤£ª¾¦³µL°ª¤â¦³µL¿ìªk¥i¥Î©O? ¦pªG¦³¬Ý¤£À´±o¤p§Ì·|¦A¦h°µ»¡©ú¡C ÁÂÁÂ
¦p¹Ï¬°§Ú·QÅܦ¨ªº³o¼Ë¡C

Q1.gif (24.94 KB)

Q1.gif

¦^´_ 1# hank10459

¨â­Ó¤èªk¥i¯à°µ¨ì§A­nªº:

1.¨Ï¥Î¦WºÙ

2.¨Ï¥Îindirect¨Ó³B²z§A­n®æ¦¡¤Æªº±ø¥ó°Ñ·Ó¡C

½Ð°Ñ¦Ò³o¸Ì:
http://tw.knowledge.yahoo.com/question/question?qid=1512071307819

TOP

¦^´_ 2# seer_et
±z¦nS¤j¡A¥Ø«e§Úªº®æ¬O¤]¨S¿ìªk¥Î¨ì¨ººØX¹Ï¥Ü»¡!½Ð°Ý¦³¿ìªk¥i¥Hµ¹¥L¥´¤W¤j¤e¤e¶Ü?

TOP

¦^´_ 1# hank10459

¤W­Óªþ¥ó, ±a¦³§A¤½¦¡µ¥. §Ú¨Ó¸Ñ¨MXªº°ÝÃD
ss

TOP

¦^´_ 4# sunnyso
¦^¯«¤HS, §Ú¤w¸g¤W²î¹Ïªí^^³Â·Ð±zÅo Q1.rar (16.84 KB)

TOP

Sonny.gif Q1-Sonny.rar (20.9 KB) ¦^´_ 5# hank10459
ss

TOP

¥»©«³Ì«á¥Ñ hank10459 ©ó 2014-3-5 11:31 ½s¿è

¦^´_ 6# sunnyso
S¤j¡A±z¦n§Ú¦³¬Ý¨ì±zªº¦^ÂСA¦ý¦]¬°§ÚLEVEL¤£°÷...¥i§_E-MAILµ¹§Ú©O¡C§Úªº«H½c¬O[email protected]    ÁÂÁÂS¤j

TOP

¦^´_ 7# hank10459

here is the code.
  1. Private Sub Worksheet_Activate()

  2. With Sheets(2)
  3.     blnk = .[R4] <> "" Or .[R5] <> "" Or .[R6] <> "" _
  4.         Or .[S5] <> "" Or .[S6] <> "" _
  5.         Or .[T5] <> "" Or .[T6] <> ""
  6. End With


  7. If blnk Then
  8.         Range("R4:T6").Select
  9.     With Selection
  10.         .WrapText = False
  11.         .Orientation = 0
  12.         .AddIndent = False
  13.         .ShrinkToFit = False
  14.         .ReadingOrder = xlContext
  15.         .MergeCells = True
  16.     End With
  17.     With Selection.Borders(xlDiagonalDown)
  18.         .LineStyle = xlContinuous
  19.         .ColorIndex = xlAutomatic
  20.         .TintAndShade = 0
  21.         .Weight = xlMedium
  22.     End With
  23.     With Selection.Borders(xlDiagonalUp)
  24.         .LineStyle = xlContinuous
  25.         .ColorIndex = xlAutomatic
  26.         .TintAndShade = 0
  27.         .Weight = xlMedium
  28.     End With
  29.     With Selection.Borders(xlEdgeLeft)
  30.         .LineStyle = xlContinuous
  31.         .ColorIndex = xlAutomatic
  32.         .TintAndShade = 0
  33.         .Weight = xlMedium
  34.     End With
  35.     With Selection.Borders(xlEdgeTop)
  36.         .LineStyle = xlContinuous
  37.         .ColorIndex = xlAutomatic
  38.         .TintAndShade = 0
  39.         .Weight = xlMedium
  40.     End With
  41.     With Selection.Borders(xlEdgeBottom)
  42.         .LineStyle = xlContinuous
  43.         .ColorIndex = xlAutomatic
  44.         .TintAndShade = 0
  45.         .Weight = xlMedium
  46.     End With
  47.     With Selection.Borders(xlEdgeRight)
  48.         .LineStyle = xlContinuous
  49.         .ColorIndex = xlAutomatic
  50.         .TintAndShade = 0
  51.         .Weight = xlMedium
  52.     End With
  53.     Selection.Borders(xlInsideVertical).LineStyle = xlNone
  54.     Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
  55. Else
  56.     Range("O4:Q6").Select
  57.     ActiveWindow.SmallScroll Down:=-6
  58.     Selection.Copy
  59.     Range("R4").Select
  60.     Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
  61.         SkipBlanks:=False, Transpose:=False
  62.     Application.CutCopyMode = False
  63.     Range("F4:H6").Select
  64.     Selection.Copy
  65.     Range("U4:W6").Select
  66.     Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
  67.         SkipBlanks:=False, Transpose:=False
  68.     Application.CutCopyMode = False

  69. End If


  70. End Sub
½Æ»s¥N½X
ss

TOP

¦^´_ 8# sunnyso


    ¦¬¨ì¤FS¤j¡CÁÂÁ±zªº´£¨Ñ¡C

TOP

¦^´_ 5# hank10459
®æ¦¡¤Æ±ø¥ó¬OµLªk±±¨î±×½uªº®æ½u
¬JµM¥ÎVBA»²§U¡A¥i¥H²³æ¤@ÂI
03BAY¤u§@ªí¼Ò²Õµ{¦¡½X
  1. Private Sub Worksheet_Activate()
  2. Dim r&, k&, i%
  3. With Sheets("(04)05BAY")
  4. For k = 3 To 33 Step 3 'CÄæ¨ìAGÄæ¡A¶¡¹j3Äæ´`Àô
  5.    For r = 4 To 26 Step 3 '²Ä4¦C¨ì26¦C¡A¶¡¹j3¦C´`Àô
  6.       If Application.CountA(.Cells(r, k).Resize(3, 3)) = 7 Then '¦pªG¥þ³¡¶ñº¡
  7.          With Cells(r, k).Resize(3, 3)
  8.             .Merge '¦X¨ÖÀx¦s®æ
  9.             For i = 5 To 6
  10.                With .Borders(i) 'µe±×½u
  11.                   .LineStyle = xlContinuous
  12.                End With
  13.             Next
  14.           End With
  15.           Else '§_«h°õ¦æ½Æ»s¶K¤W¡B²M°£¤º®e
  16.           .Cells(r, k).Resize(3, 3).Copy Cells(r, k): Cells(r, k).Resize(3, 3) = ""
  17.        End If
  18.     Next
  19. Next
  20. End With
  21. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

        ÀR«ä¦Û¦b : ¯à·F¤£·F¡A¤£¦p­W·F¹ê·F¡C
ªð¦^¦Cªí ¤W¤@¥DÃD