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

[µo°Ý] ·Q½Ð°Ý¦p¦ó¸Ñ¨M¡y°õ¦æ¶¥¬q¿ù»~¡§13"¡A«¬ºA¤£²Å¦X¡z

[µo°Ý] ·Q½Ð°Ý¦p¦ó¸Ñ¨M¡y°õ¦æ¶¥¬q¿ù»~¡§13"¡A«¬ºA¤£²Å¦X¡z

¦¹µ{¦¡½X¦b°õ¦æªº®É­Ô¦b
Range("e" & j) = (hilow.Offset(0, 5).Value - Range("b" & j).Value) / hilow.Offset(0, 5).Value
³o¦a¤è¡A¤@ª½¥X²{¡y°õ¦æ¶¥¬q¿ù»~¡§13"¡A«¬ºA¤£²Å¦X¡z¿ù»~¡A
hilow ¬O·j´Mµ²ªG±o¨ìªºÀx¦s®æÅܶq
µM«á§Ú¬O·Q±N·j´Mµ²ªG¨º¤@¦æªºÀx¦s®æ­Èhilow.Offset(0, 5)¶K¨ì¥t¤@¤u§@ªí¤W

½Ð°Ý­n¦p¦ó§ï¶i¤~¯àdebug¡AÁÂÁ¡I

ps.¦¹¬°Â^¨ú¤@³¡¤À¥D­n¥X°ÝÃDªºµ{¦¡½X¡A§¹¾ãªº©óªþ¥ó
  1. Sub test()

  2.     Dim Blast As Integer
  3.     Dim hilow As Range
  4.     Dim j As Integer
  5.    
  6.   
  7.   Blast = Range("AA4").End(xlDown).Row
  8.   For j = 6 To (Blast * 2) - 1 Step 2
  9.        Set hilow = Sheets("G.&E.").Range("c:j").Find(Range("a" & j))
  10.          If Not hilow Is Nothing Then
  11.             Range("e" & j) = (hilow.Offset(0, 5).Value - Range("b" & j).Value) / hilow.Offset(0, 5).Value
  12.             Range("e" & j + 1) = (hilow.Offset(0, 6).Value - Range("b" & j)) / hilow.Offset(0, 6).Value
  13.          End If
  14.           Range("D" & j) = "=(B" & j & "-C" & j & ")/B" & j
  15.   Next j

  16. End Sub
½Æ»s¥N½X
¬¡­¶Ã¯1.xlsm 2.zip (277.22 KB)

¥»©«³Ì«á¥Ñ stillfish00 ©ó 2015-7-16 18:16 ½s¿è

¦^´_ 1# HSINLI
j = 80®É ¡A Find "NGE" ¥h§ä¨ì ¼ÐÃDÄ檺 "change"

¥i¥H§ï¦¨³o¼Ë
Set hilow = Sheets("G.&E.").Range("c:c").Find(Range("a" & j), LookAt:=xlWhole)
ªí¹F¤£²M¡BÃD·N¤£©ú½T¡B¨SªþÀɮ׮榡¡B¨S¦³°Q½×°ÝÃDªººA«×~~~~~~¥H¤W·R²ö¯à§U¡C

TOP

¦^´_ 1# HSINLI

³o¬qµ{¦¡½X·|©ì©µµ{¦¡°õ¦æªº³t«×
  1. Blast = Range("AA4").End(xlDown).Row '±N¤U¸ü¥«»ùÀx¦s®æ¥[¤j
  2. For i = 7 To (Blast * 2) Step 2
  3.     Cells(i, 2).Insert shift:=xlDown '¼W¥[Àx¦s®æ
  4.     Range("b" & i - 1 & ":b" & i).Select '¦X¨ÖÀx¦s®æ
  5.    Selection.MergeCells = True
  6.    With Selection.Borders(xlEdgeTop)
  7.         .LineStyle = xlContinuous
  8.         .ColorIndex = 0
  9.         .TintAndShade = 0
  10.         .Weight = xlThin
  11.     End With
  12.     With Selection.Borders(xlEdgeBottom)
  13.         .LineStyle = xlContinuous
  14.         .ColorIndex = 0
  15.         .TintAndShade = 0
  16.         .Weight = xlThin
  17.         End With
  18.         Selection.NumberFormatLocal = "0.00_ "
  19. Next i
½Æ»s¥N½X
¥i­×§ï¬°¦p¤U¸Õ¸Õ¬Ý
  1. Dim Ar(), x As Integer
  2.     Ar = Range("b6", Range("b6").End(xlDown)).Value     'BÄ檺­È¾É¤J°}¦C
  3.     With Range("A6", Range("A" & Rows.Count).End(xlUp)) 'AÄ檺¦X¨ÖÀx¦s®æ
  4.         .Select
  5.         Selection.Copy Range("B6")                       '½Æ»s¨ì BÄæ
  6.         With .Offset(, 1)                                'BÄæ
  7.             For i = 1 To .Cells.Count Step 2
  8.                 x = Application.Round(i - (i / 2), 0)    '°}¦C¤¸¯Àªº¯Á¤Þ­È (¥|±Ë¤­¤J¹Bºâªºµ²ªG)
  9.                 .Cells(i) = Ar(x, 1)
  10.             Next
  11.             With .Borders
  12.                 .LineStyle = xlContinuous
  13.                 .ColorIndex = 0
  14.                 .Weight = xlThin
  15.                 .TintAndShade = 0
  16.             End With
  17.         End With
  18.     End With
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 2# stillfish00

·Q½Ð°Ý¤@¤Us¤j
¬O«ç¼Ë´ú¥X¨Ó»¡¦bj=80®É¡A¥X°ÝÃDªº°Ú¡I¡H
¤U¦¸·Q¦Û¤v§ì§ì¬Ý°ÝÃD¦b­þ

TOP

¦^´_ 3# GBKEE

ÁÂÁÂg¤j¡I
¥i¦æ¥B¯uªº¤ñ¸û§Ö¡AÁÂÁ§A¡I

TOP

¦^´_ 4# HSINLI
¦]¬°¨S¼u¥X°»¿ù«ö¶s
§Ú¬O¥Î¤U­±³o¼Ë°±¨ìµo¥Í¿ù»~ªº¨º¦æ¡A¦A¥h¬ÝÅܼÆ
  1. Private Sub CommandButton2_Click()
  2. On Error GoTo ERR_HANDLE
  3.    
  4.     ...

  5. Exit Sub
  6. ERR_HANDLE:
  7.     Stop    'F8 to resume error line
  8.     Resume
  9. End Sub
½Æ»s¥N½X
ªí¹F¤£²M¡BÃD·N¤£©ú½T¡B¨SªþÀɮ׮榡¡B¨S¦³°Q½×°ÝÃDªººA«×~~~~~~¥H¤W·R²ö¯à§U¡C

TOP

        ÀR«ä¦Û¦b : ¤H­n¦Û·R¡A¤~¯à·R´¶¤Ñ¤Uªº¤H¡C
ªð¦^¦Cªí ¤W¤@¥DÃD