Move column with DropDown Content.

HGDantes

New Member
Joined
Feb 10, 2023
Messages
16
Office Version
  1. 2019
Platform
  1. Windows
Hello

I got a script to build huge report with several sheets columns and Vlookups referencing many other reports.

At the end of my process, I got this :

VBA Code:
Columns("AG:AG").Select
    Selection.Cut
    Columns("F:F").Select
    Selection.Insert Shift:=xlToRight

The problem is that there's a DropDown menu on cells in columns AG and there's also a DropDown on column E, and after the Cut and Paste, column F (Formally column AG) don't keep it's DropDown and inherit the DropDown Menu from Column E.

Any Idea to fix that?

Thanks
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
I hope that I understand the issue...Perhaps try 1) inserting an empty Column F then 2) copying from column AG to column F then 3) deleting the now empty column AG

Also note that you can PasteSpecial validation in cells.

VBA Code:
Sub Macro1()

    With ActiveSheet
    
        .Range("AG:AG").Copy
    
'       Insert copied cells (from Column AG)
        .Range("F:F").Insert
        
'       Clear cells in what was Column AG and now is AH after insert of F
'        .Range("AH:AH").Clear
    
'       ...or delete column AH?
        .Range("AH:AH").Delete
    
    
    End With

End Sub
 
Upvote 0

Forum statistics

Threads
1,225,138
Messages
6,183,084
Members
453,146
Latest member
Lacey D

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top