學(xué)習(xí)啦 > 學(xué)習(xí)電腦 > 工具軟件 > 辦公軟件學(xué)習(xí) > Excel教程 > Excel基礎(chǔ) > Excel表格如何移動列數(shù)據(jù)

Excel表格如何移動列數(shù)據(jù)

時間: 嘉銘873 分享

Excel表格如何移動列數(shù)據(jù)

  在excel表格中,需要對整列數(shù)據(jù)進行移動時,應(yīng)該怎么設(shè)置呢?下面隨學(xué)習(xí)啦小編一起來看看吧。

  Excel表格移動列數(shù)據(jù)的步驟

  單擊菜單欄--視圖--宏--查看宏。

  彈出宏的界面,輸入宏的名稱,這里為了便于記憶,我們命名為向左移動一列,然后點擊創(chuàng)建按鈕。

  在新出現(xiàn)的界面中,輸入代碼,也就是程序語言,我已經(jīng)寫好了,大家直接復(fù)制即可。

  Application.ScreenUpdating = False

  x = Selection.Column

  If x >= 1 Then

  Columns(x).Cut

  Columns(x - 1).Insert

  Application.ScreenUpdating = True

  End If

  退出編輯狀態(tài),選中單元格或者整列,執(zhí)行宏即可。下面,我把向右移動一列的代碼也給大家。

  Application.ScreenUpdating = False

  x = Selection.Column

  If x < 256 Then

  Columns(x).Cut

  Columns(x + 2).Insert

  End If

  Application.ScreenUpdating = True

  End Sub


Excel表格移動列數(shù)據(jù)相關(guān)文章:

1.excel表格移動整列數(shù)據(jù)的方法

2.excel怎么移動表格的行

3.excel怎么移動行和列

1832265