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

¦p¦ó´M§ä«ü©w¦ì¸m«á­pºâ¤½¦¡

¦p¦ó´M§ä«ü©w¦ì¸m«á­pºâ¤½¦¡

½Ð°Ý¦U¦ì:
¦p¦ó¥i¥H¦b¨C­Ó¤u§@ªí¤¤§ä´M¨ì"TOTAL"«á
¦A¿é¤J¤½¦¡
¦ý¨C¤@­¶ªº¦C¼Æ¤£¦P, ¦ýÄæ¦ì¬Û¦P
­pºâ«á¦A¸õ¦Ü¤U¤@­¶¦Û°Ê­pºâ,
¤u§@­¶¼Æ¤£©T©w
ÁÂÁÂ

¦Û°Ê­pºâ.zip (13.89 KB)

¦^´_ 1# enoch
  1. Sub ex()
  2. Dim Sh As Worksheet, A As Range
  3. For Each Sh In Sheets
  4. With Sh
  5.   Set A = .Columns("C:E").Find("Total")
  6.   If Not A Is Nothing Then .Cells(A.Row, "F") = "=SUM(R2C:R[-1]C)"
  7. End With
  8. Next
  9. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¥»©«³Ì«á¥Ñ enoch ©ó 2011-2-17 17:20 ½s¿è

Hsieh ÁÂÁ§A
§Ú¸Õ¨ì¤F

TOP

hsieh

½Ð¦A«ü±Ð, §Ú¥»¨­¦³¤@­Óvba¥Î§@±N¤u§@ªí¦WºÙ¸ò¾ÚÀx¦s®æ¤º®e¦Ó§ó§ï
¦ý§Ú­øª¾À³¸Ó±N¨â­Óvba²¤Æ¦X¨Ö, ¤Î¹J¨ìªÅ¥Õ¤u§@ªí®É¤£·|¥X²{error

enoch



Sub update()

    Windows("¶×¥XPACKING LIST.xls").Activate
   
    num = ActiveWorkbook.Worksheets.Count
    For i = 1 To num

            Value = Range("i11")

            pos = InStr(1, Worksheets(i).Range("i11").Value, "/") + 5

       If Worksheets(i).Range("e10").Value > 0 Then
        
            aa = 0
            For j = num To i + 1 Step -1
                 If Mid(Worksheets(j).Range("i11").Value, pos, 4) = Mid(Worksheets(i).Range("i11").Value, pos, 4) Then
                    aa = aa + 1
                End If
            Next j
            If aa > 0 Then
                 Worksheets(i).Name = "##" & Mid(Worksheets(i).Range("i11").Value, pos, 4) & "(" & A & ")"
            Else
                Worksheets(i).Name = "##" & Mid(Worksheets(i).Range("i11").Value, pos, 4)
            End If
        End If

    Next i
   
    Worksheets(1).Activate
   
   
    End Sub

TOP

        ÀR«ä¦Û¦b : ­n¤ñ½Ö§ó¨ü½Ö¡D¤£­n¤ñ½Ö§ó©È½Ö¡C
ªð¦^¦Cªí ¤W¤@¥DÃD