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

[µo°Ý] ½Ð°Ý¦p¦ó¼¶¼gVBA¡A±NªÅ®æ¶ñº¡ (¤w¸Ñ¨M)

[µo°Ý] ½Ð°Ý¦p¦ó¼¶¼gVBA¡A±NªÅ®æ¶ñº¡ (¤w¸Ñ¨M)

¥»©«³Ì«á¥Ñ sax868 ©ó 2012-5-23 16:01 ½s¿è

05222012.zip (10.85 KB)
  1. Sub Macro4()
  2. '
  3. ' Macro4 Macro
  4. '

  5. '
  6.     Range("C6,C11,C13,C15,C17,C19,C21,C23,C28,C31:C33,C6").Select
  7.     Selection.FormulaR1C1 = "=R[-1]C"
  8.     Range("E3:E6,E8:E11,E13,E15,E17,E19,E21,E23,E25:E28,E30:E34,E3").Select
  9.     Selection.FormulaR1C1 = "=R[-1]C"
  10.     Cells.Select
  11.     Selection.Copy
  12.     Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
  13.         :=False, Transpose:=False
  14.     Rows("33:34").Select
  15.     Application.CutCopyMode = False
  16.     Selection.Delete Shift:=xlUp
  17.     Range("B32").Select
  18. End Sub
½Æ»s¥N½X


¦U¦ì¤j¤j¤È¦w:
½Ð°Ý¸Ó¦p¦ó¼¶¼gVBA¡A±NªÅ®æ¶ñº¡? ¥H¤W¬O§Ú¿ýªº¥¨¶°·Ð½Ð°Ñ¦Ò

§Ú¸ÕµÛ¼g¥i¬O¤£ÆF¥ú:
Sub FF()
Columns("C:C").Select
Rng.Replace "", "=R[-1]C"
End Sub

«ô°U°ª¤â¤j¤j­ÌÀ°À°§Ú...
ÁÂÁÂ!

®z¤k¤l¯d

¦^´_ 1# sax868
  1. Sub zz()
  2. LR = [A2].End(xlDown).Row
  3. On Error Resume Next
  4. Set Rng = Union(Range("C2:C" & LR), Range("E2:E" & LR)).SpecialCells(xlCellTypeBlanks)
  5. For Each X In Rng
  6.   X.Replace "", X.Offset(-1, 0)
  7. Next
  8. End Sub
½Æ»s¥N½X

TOP

¦^´_ 1# sax868
  1. Sub Ex()
  2.     Dim xi As Integer
  3.     With Range("A:A").SpecialCells(xlCellTypeConstants)   'AÄ檺¸ê®Æ½d³ò
  4.      For xi = 2 To 4 Step 2
  5.         With .Offset(, xi)                                'C ,D Äæ
  6.             .SpecialCells(xlCellTypeBlanks) = "=R[-1]C"   'ªÅ¥Õªº½d³ò ¼g¤U¤½¦¡
  7.             .Value = .Value                               'Äæ½d³ò¤¤ªº¤½¦¡´«¬°ªº­È
  8.         End With
  9.      Next
  10.     End With
  11. End Sub
½Æ»s¥N½X

TOP

¦^´_ 3# GBKEE

¶È¥Î¤@¦¸¤½¦¡¶ñº¡¾ãÄ檺ªÅ®æ
¦A¥Î¤@¦¸­È¶ñº¡¾ãÄ檺¤½¦¡

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2012-5-22 17:02 ½s¿è

¦^´_ 2# register313
¬°¦ó·|©äÅs¥ÎReplace
X.Replace "", X.Offset(-1, 0) -> X.Value = X.Offset(-1, 0)
¦^´_ 4# register313
¬O±NªÅ¥ÕªºCell ¶ñ¤W¤½¦¡ ,¦A¨ú±o¤½¦¡ªº­È.

TOP

¦^´_ 3# GBKEE

·PÁÂregister313¤j¤j¤Î GBKEE¤j¤j ¹©¤O¬Û§U¡A¨â­Ó¤èªk³£¥i¦æ¡A«Ü¦n¥Î³á¡I

   
®z¤k¤l¯d

TOP

¦^´_ 5# GBKEE

«u§r! ³o´N¬OVBA¦UºØ»yªk¤£ºë¼ô©Ò³y¦¨ªºµ²ªG! (¤£¹L³o¦¸¤]¤Ó¦h¦¹¤@Á|¤F)
½ÐGBKEEª©¥D¦h«ü¾É!

TOP

        ÀR«ä¦Û¦b : ¤H­nª¾ºÖ¡B±¤ºÖ¡B¦A³yºÖ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD