1

I have a named range "ABC", range is ("A1", "A3", "A5"). Now I need to use Macro to extend the range to ("A1", "A3", "A5", "A7"), that is, adding "A7" to the existing named range "ABC".

Any ideas to solve this problem?

Thanks in advance!

1 Answer 1

3
Application.Union(Range("BLAH"), Range("A7")).Name = "BLAH"
Sign up to request clarification or add additional context in comments.

3 Comments

Addendum if he would like to add a his current selection to his named range Application.Union(Range("ABC"), Selection).Name = "ABC"
Thanks! This is what I wanted.@Tim Williams
It is continuously giving this error - Method Union of Object _Application failed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.