求excel行移动和列移动vba

来源:百度知道 编辑:UC知道 时间:2024/09/19 15:50:35
谢谢lxlzmh2002

我可以帮您试一下,请HI我.
回答者: lxlzmh2002 - 魔导师 十级 2009-8-31 23:31
=================================================================
再来更新此贴:

一. 移动程序代码:
Sub ToMove()

'this program is designed for cells moving by lxlzmh2002 on Sep 2,2009

Dim sht As Object
Dim rs As Long
Dim cs As Long
Dim i As Long
Dim rc As String
Dim mf As String
Dim mt As String
Dim rcs As Long
Dim os As Integer

Application.EnableEvents = False
Application.ScreenUpdating = False

'moving commands checking
os = 1
Sheets("order").Select
rs = Range("A65536").End(xlUp).Row
For i = 2 To rs
If InStr(1, Cells(i, 1), ":") <> 0 Then
Cells(i, 1) = WorksheetFunction.Substitute(Cells(i, 1), ":", ":")
End If

If (Left(Cells(i, 1), 1) = "r" Or Left(Cells(i, 1), 1) = &q