How Can I move columns around the sheet on excel?

I want to change the columns from B to F and C to E and like that … Can someone provide me an VBA or some macro to use ? I tried with below scenario

Copy the Sheet
Delete Original sheet’s data
Read columns and paste the data on the original sheet .

FYI - having an issue in column with Price in the data and also it is taking longer time to execute.


Try with this using execute macro activity
Include this in your excel file as a macro

Sub SwapColumns()
    Dim ws As Worksheet
    Dim tempRange As Range
    ' Specify the worksheet where you want to swap columns
    Set ws = ThisWorkbook.Sheets("Sheet1") ' Change "Sheet1" to your sheet name
    ' Define the range of columns to be swapped
    Set tempRange = ws.Range("B:B")
    ' Cut and insert the range to swap columns
    ws.Columns("C:C").Insert Shift:=xlToRight
    Application.CutCopyMode = False ' Clear the clipboard
    ' Repeat the process for other columns if needed (e.g., C to D, D to E, etc.)
    ' Adjust the range and columns as per your requirement
End Sub

Hope this helps

But If that swaps over the columns which has data in there so what about that data ? I mean confused there if it’s overriding the data then what about those previous data ? How can we get that for other columns where I want to re-write?

@Palaniyappan Can I do from other sheet ? How Can I copy the column from other sheet ? I mean I can do copy of the sheet and wipe out the data on original then We can create a macro to copy from the sheet to original sheet.

Does this make sense ?