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

[µo°Ý] ¦p¦ó ¨ú¤£¦P¤u§@ªíªºÄæ¦ì­È,±a¤J¥t¤@¤u§@ªí°µ¹Bºâ

¦^´_ 5# lpk187


    Sub Â^¨ú()
    Dim Rng As Range, aRng As Range, bRng As Range
    With Sheets("²Î­p")
        .Range("B2:C" & .Cells(Rows.Count, 1).End(xlUp).Row).ClearContents
        For Each Rng In .Range("A2:A" & .Cells(Rows.Count, 1).End(xlUp).Row)
            Set aRng = Sheets("¥Ò").Columns(1).Find(Rng.Value, LookIn:=xlFormulas, LookAt:=xlWhole, SearchDirection:=2)
            Set bRng = Sheets("¤A").Columns(1).Find(Rng.Value, LookIn:=xlFormulas, LookAt:=xlWhole, SearchDirection:=2)
            If Not aRng Is Nothing Then Rng.Offset(, 1) = aRng.Offset(, 11)
            If Not aRng Is Nothing Then Rng.Offset(, 2) = bRng.Offset(, 11)
        Next
    End With
End Sub
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

½Ð°Ýlpk187 ¤j¤j ³o¨â­Ó¨ú¥Xªº­È (¬Û¥[) µM«á¦b¥[¤W¤@­Ó­t­È  ¨Ã§â¥¦©T©w©ñ¦b ...©T©wGÄ檺Àx¦s®æ(±qG3¶}©l±N­È©ñ¤J..)

»¡©ú¤@¤U  "³o¨â­Ó¨ú¥Xªº­È (¬Û¥[) µM«á¦b¥[¤W¤@­Ó­t­È "
¤ñ¦p ¨ú¥X 192  336,,,-(192+336)=-528
¦A¦¸·PÁ§AªºÀ°¦£  ÁÂÁÂ
¾Ç²ß ¾Ç²ß ¤@ª½¾Ç²ß

TOP

¥»©«³Ì«á¥Ñ lpk187 ©ó 2016-3-16 09:10 ½s¿è

¦^´_ 11# peter95

¤U¹Ï¬OÅý§AÁA¸ÑRangeª«¥óªºOffsetÄÝ©Ê¡G¹Bºâ¦¡.Offset(¦Cªº°¾²¾¶q, Ä檺°¾²¾¶q)

·|Åý§A§ó®e©öÁA¸Ñµ{¦¡«ç»ò¹B§@ªº

  1. Option Explicit

  2. Sub Â^¨ú()
  3.     Dim Rng As Range, aRng As Range, bRng As Range
  4.     With Sheets("²Î­p")
  5.         .Range("B2:C" & .Cells(Rows.Count, 1).End(xlUp).Row).ClearContents
  6.         For Each Rng In .Range("A2:A" & .Cells(Rows.Count, 1).End(xlUp).Row)
  7.             Set aRng = Sheets("¥Ò").Columns(1).Find(Rng.Value, LookIn:=xlFormulas, LookAt:=xlWhole, SearchDirection:=2)
  8.             Set bRng = Sheets("¤A").Columns(1).Find(Rng.Value, LookIn:=xlFormulas, LookAt:=xlWhole, SearchDirection:=2)
  9.             If Not aRng Is Nothing Then Rng.Offset(, 1) = aRng.Offset(, 11)
  10.             If Not bRng Is Nothing Then Rng.Offset(, 2) = bRng.Offset(, 11)
  11.             Rng.Offset(, 6) = -(Rng.Offset(, 1) + Rng.Offset(, 1))
  12.         Next
  13.     End With
  14. End Sub
½Æ»s¥N½X

TOP

¦^´_ 11# peter95


    ÁÙ¦³§Ú²Ä¤@¦¸PO¦¸ªº¥N½X¤¤
If Not aRng Is Nothing Then Rng.Offset(, 1) = aRng.Offset(, 11)
If Not aRng Is Nothing Then Rng.Offset(, 2) = bRng.Offset(, 11)<<=³o¥y¬O¿ùªº
À³¸Ó­×¥¿¬°
If Not bRng Is Nothing Then Rng.Offset(, 2) = bRng.Offset(, 11)

TOP

        ÀR«ä¦Û¦b : ¸Ü¦h¤£¦p¸Ü¤Ö¡A¸Ü¤Ö¤£¦p¸Ü¦n¡C
ªð¦^¦Cªí ¤W¤@¥DÃD