Hello,
I have a named range (rangeAdded) that is created with an inputbox
rng = Application.InputBox("Select a range", "Obtain Range", Type:=8)
ThisWorkbook.Names.Add Name:="rangeAdded", RefersTo:=rng
For example, rangeAdded = Sheet1!$D$3:$F$5
Next, I use the inputbox again and select a range. Now, I need this to be added to the existing range so it includes both the old and the new range. If I now select Sheet1!$F$2:$H$5, the final range stored should become
rangeAdded = Sheet1!$D$3:$F$5,Sheet1!$F$2:$H$5
I tried union and simple &, but could not get it to work. Any help will be appreciated.
I have a named range (rangeAdded) that is created with an inputbox
rng = Application.InputBox("Select a range", "Obtain Range", Type:=8)
ThisWorkbook.Names.Add Name:="rangeAdded", RefersTo:=rng
For example, rangeAdded = Sheet1!$D$3:$F$5
Next, I use the inputbox again and select a range. Now, I need this to be added to the existing range so it includes both the old and the new range. If I now select Sheet1!$F$2:$H$5, the final range stored should become
rangeAdded = Sheet1!$D$3:$F$5,Sheet1!$F$2:$H$5
I tried union and simple &, but could not get it to work. Any help will be appreciated.