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

[µo°Ý] ¼g§PÂ_¦¡¦pªG¸õ²æ¥Îªº¼Æ­È­n±q­ì©l¸ê®Æ¤¤§ì¨ú¸Ó¦p¦ó¬O¦n

[µo°Ý] ¼g§PÂ_¦¡¦pªG¸õ²æ¥Îªº¼Æ­È­n±q­ì©l¸ê®Æ¤¤§ì¨ú¸Ó¦p¦ó¬O¦n

¥»©«³Ì«á¥Ñ GBKEE ©ó 2015-6-20 14:16 ½s¿è

¤p©f¤£¤~¡A¼g¤F¤@¬q§PÂ_­ì©lEXCEL¤u§@ªí¤¤ªºªí®æ¨®½ø¼Æ
­ì©l¸ê®Æªí®æ¦p¤U

¥i¬O¶]µ{¦¡®É·|¥X²{¸ê®Æ«¬ºA¤£¥¿½Tªº¿ù»~°T®§
µ{¦¡¦p¤U

Sub ¨®½ø¦hµ§©î¦¨¤@µ§()
Dim car_num, last_row As Integer
Dim mycell As Range


ActiveSheet.Cells.SpecialCells(xlLastCell).Select
last_row = Selection.Row


For i = 1 To last_row
Set mycell = ActiveSheet.Cells(i, 2)
car_num = mycell.Value

    If car_num > 1 Then
    mycell.Interior.ColorIndex = 2
        For j = 1 To car_num  <-----¿ù»~¥X²{¦æ¡A©Ò¥H¬O¤£¯à±N¸ê®Æªí®æ¤¤ªº­È·í§@¯u¥¿ªº¼Æ¦r¥h¶]¦^°é¶Ü??¥i¬O³o¬O°ß¤@§PÂ_ªº¼Æ­È°Ú..¨D¸Ñ  TT
           mycell.Rows(i).Insert
           mycell.Rows(i).Copy Destination:=mycell.Rows(i + j)
           a = ActiveSheet.Cells(i, car_num).Value
           ActiveSheet.Cells(i, car_num).Value = a / car_num
           b = ActiveSheet.Cells(i, 8).Value
           ActiveSheet.Cells(i, 8).Value = b / car_num
           c = ActiveSheet.Cells(i, 9).Value
           ActiveSheet.Cells(i, 9).Value = c / car_num
           ActiveSheet.Cells(i, 11).Value = ActiveSheet.Cells(i, 9).Value * ActiveSheet.Cells(i, 10).Value
           d = ActiveSheet.Cells(i, 12).Value
           ActiveSheet.Cells(i, 12).Value = d / car_num
           e = ActiveSheet.Cells(i, 13).Value
           ActiveSheet.Cells(i, 13).Value = e / car_num
           f = ActiveSheet.Cells(i, 14).Value
           ActiveSheet.Cells(i, 14).Value = f / car_num
        Next j
    End If
Next i

End Sub

¦^´_ 1# Ackroyd


1.ActiveSheet¤£»Ý­n¦b¨C­Ó¦a¤è³£¨Ï¥Î
2.±zªºµ{¦¡½X¥i¥H¦A²µu³\¦h,¥¼¨Ó¤ñ¸û®e©öºûÅ@

±zªþÀÉ®×
À°±z¬Ý¤ñ¸û§Ö
PKKO

TOP

'¤£¤Ó·|¬Ýµ{§Ç½Ð°Ñ¦Ò¤@¤U
Sub xx()
lastrow = [A65536].End(xlUp).Row  ''§PÂ_³Ì«á¤@¦C
For j = 1 To lastrow
xr = Cells(j, 1)
    For i = 1 To xr
        Cells(i, 4) = Cells(i, 4) / xr ''¥Î¦Û¤v°£
    Next
Next
End Sub

TOP

¦^´_ 1# Ackroyd
  1. If car_num > 1 Then
  2.         MsgBox car_num  '´ú¸Õ¬Ý¬Ý¬O¼Æ­È¶Ü?
  3.         mycell.Interior.ColorIndex = 2
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

GB¤j©Ò¨¥¬Æ¬O

­ì¦]´N¬O¨º¤@Ä榳«Ü¦hªÅ¥Õ­È¤£³Q·í§@¼Æ­È

·PÁ§A!!!!

TOP

        ÀR«ä¦Û¦b : ¯àµ½¥Î®É¶¡ªº¤H¡A¥²¯à´x´¤¦Û¤v§V¤Oªº¤è¦V¡C
ªð¦^¦Cªí ¤W¤@¥DÃD