PDA

View Full Version : Dynamic range based off selection



MM1234
04-07-2016, 08:49 AM
Hello,

I am trying to format a VBA code that will be based off a selected dynamic range. This range will always change, so I can't set a beginning cell, end cell, or an offset because it is constantly changing. Is there a way to set a code to run based off whichever rows i have selected, no matter what is selected? Thanks in advance for any help.

Thanks,

jonh
04-08-2016, 03:22 AM
Excel?


For Each r In Selection
Debug.Print r.Address, r.Text
Next