Hi I was wondering if anyone could help me create a macro that will add a selection to excels custom List. Typically to do this I select a a series of rows in one column, then I got to file, options, advanced and scroll to the very bottom and click edit custom lists. When going through this with the macro creator turned on all I get is a very simple script that is related to the specific cells I have selected. I would like to tweak the code so that it is using whatever I have currently selected to add to the custom list. That way I am not always tied down to the J4-J9 Range. Below is the code I receive.
Sub Customlistadd() ' ' Customlistadd Macro ' ' Keyboard Shortcut: Ctrl+Shift+I ' Application.AddCustomList ListArray:=Range("J4:J8") End Sub
Is it as simple as adding current selection in place of j4:j8? If so how do I do I write that exactly? Do I first need to declare a variable type to hold the current section? Almost all examples I've looked at that seem to be attempting to do something along the lines of what I am trying to do tend to use variables to hold the current selections range. Thank you.