在工作表的最后一列之后移动列 [英] move column after last column in sheet

查看:87
本文介绍了在工作表的最后一列之后移动列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们假设我选择了B列,并且有8列数据。我想将列B移到第一列并移动所有内容,因此没有空列

So lets say I have selected column B and there are 8 columns of data. I want to move column B to column I and shift everything along so there are no empty columns

推荐答案

例如:

Sub Macro1()

    Selection.EntireColumn.Cut

    Cells.Find(What:=" *" ;, SearchOrder:= xlByColumns,_

        SearchDirection:= xlPrevious).Offset(0 ,1).EntireColumn.Insert

End Sub

Sub Macro1()
    Selection.EntireColumn.Cut
    Cells.Find(What:="*", SearchOrder:=xlByColumns, _
        SearchDirection:=xlPrevious).Offset(0, 1).EntireColumn.Insert
End Sub


这篇关于在工作表的最后一列之后移动列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆