Simple Macro to 'Clear Contents' of Named Range and type "Active" in another Named Range

Hello Experts,

I recorded a macro, and then looked at the code.

Option Explicit

Sub Macro1()
'
' Macro1 Macro
'

'
    Range("I13:M13,S13:W13").Select
    Range("S13").Activate
    Selection.ClearContents
    Range("N13:R13").Select
    ActiveCell.FormulaR1C1 = "Active"
    Range("A1").Select
End Sub

Open in new window


I know this code can be streamlined quiet a bit, so here is what I would like.

Step 1: "Clear Contents" of named cell (part of merged cells): RVName & RVFreeze.
Step 2: Type "Active" into named cell (part of merged cells): RVStatus.

Thank you in advance for your help!
LVL 1
GeekamoAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

MacroShadowCommented:
Range("RVName").ClearContents
Range("RVFreeze").ClearContents
Range("RVStatus").Value = "Active"
GeekamoAuthor Commented:
@ MacroShadow - Any idea what I can do?  The cells that have "1" are the cells / named cells that I am working.  The code doesn't like that it's part of merged cells.  (I technically need them merged, because two of them will soon contain drop down menus)

error
MacroShadowCommented:
Instead  of using the names range use their addresses, i.e. Range("H8:L8").ClearContents

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Martin LissOlder than dirtCommented:
Named ranges containing merged cells normally aren't a problem.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.