Board logo

¼ÐÃD: [µo°Ý] ¤£¯S©w¿ï°Ïªº¸ê®Æ¤¬´« [¥´¦L¥»­¶]

§@ªÌ: jesscc    ®É¶¡: 2019-12-2 10:14     ¼ÐÃD: ¤£¯S©w¿ï°Ïªº¸ê®Æ¤¬´«

§Ú·Q¦bJÄæ¿ï¨ú¤@­Ó¤£¯S©wªº°Ï°ì(Ä´¦pJ13:J17)¡AµM«á¸ò¤£¦PÄæ¦ý¦P¦CªºE13:E19¸ê®Æ¤¬´«¡C¦Û¤v¼g¤F¤@¬q¡A¦ý¨S§@¥Î¡A¯àÀ°¦£¬Ý¤@¤U¸Ó¦p¦ó§ï¶Ü?
[attach]31484[/attach]
§@ªÌ: jcchiang    ®É¶¡: 2019-12-2 13:15

¦^´_ 1# jesscc

¸Õ¸Õ¬Ý
Private Sub CommandButton1_Click()

Set frow = Selection.SpecialCells(xlCellTypeVisible)(1)
Set lrow = Selection.SpecialCells(xlCellTypeLastCell)
rng1 = Range("J" & frow.Row, "J" & lrow.Row)
rng2 = Range("E" & frow.Row, "E" & lrow.Row)

'A = rng1
'rng1 = rng2
'rng2 = A

Range("J" & frow.Row, "J" & lrow.Row) = rng2
Range("E" & frow.Row, "E" & lrow.Row) = rng1

End Sub
§@ªÌ: jesscc    ®É¶¡: 2019-12-2 14:25

¦^´_ 2# jcchiang
³o¼Ë¤£¦æ¡A«D¿ï¨ú°Ï°ìªº¸ê®Æ¤]·|¸òµÛ¤¬´«
§@ªÌ: jcchiang    ®É¶¡: 2019-12-2 16:39

¦^´_ 3# jesscc

¦A¸Õ¸Õ
Private Sub CommandButton1_Click()

Set frow = Selection.SpecialCells(xlCellTypeVisible)
lrow = frow.Row + frow.Count - 1
rng1 = Range("J" & frow.Row, "J" & lrow)
rng2 = Range("E" & frow.Row, "E" & lrow)

Range("J" & frow.Row, "J" & lrow) = rng2
Range("E" & frow.Row, "E" & lrow) = rng1

End Sub
§@ªÌ: hcm19522    ®É¶¡: 2019-12-2 18:27

https://blog.xuite.net/hcm19522/twblog/588682462
§@ªÌ: jesscc    ®É¶¡: 2019-12-2 19:23

¦^´_  jesscc

¦A¸Õ¸Õ
Private Sub CommandButton1_Click()

Set frow = Selection.SpecialCells(xlC ...
jcchiang µoªí©ó 2019-12-2 16:39


j¤j¡A§ï¥Î¤W­z¼gªk¡A¦b´ú¸ÕÀɸ̥i¥H¥¿±`¹B§@¡A¦ý§Ú¥Î¦b¹ê»Úªº¤u§@ÀÉùصo¥Í¤F¤@­Ó°ÝÃD:¦pªG¥u¦³¿ï¨ú¤@¦C(­Ó)Àx¦s®æ·|¥X²{"·¸¦ì"ªº°»¿ù¡A±zª¾¹D³o¬O­þ¸Ì¦³°ÝÃD¶Ü?
§@ªÌ: jcchiang    ®É¶¡: 2019-12-3 12:47

¦^´_ 6# jesscc

¨S¦³¬Ý¨ì¹ê»Úªºª¬ªpµLªkª¾¹D­ì¦]
¦ý´ú¸Õ¹L¿ï¤@¦C(­Ó)Àx¦s®æ¬O¥i¥H¤¬´«ªº
§@ªÌ: ­ã´£³¡ªL    ®É¶¡: 2019-12-5 14:35

Private Sub CommandButton1_Click()
Dim xB As Range, Arr
With Selection
     If .Columns.Count > 1 Or .Column <> 10 Then Exit Sub
     If Intersect(Me.UsedRange, .Cells).Address <> .Address Then Exit Sub
     Set xB = Range(Replace(.Address, "J", "E"))
     Arr = .Value
     .Value = xB.Value
     xB.Value = Arr
End With
End Sub




Åwªï¥úÁ{ ³Â»¶®a±Ú°Q½×ª©ª© (http://forum.twbts.com/)