With End using multiple ranges

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is it possibe to use With End stmts on muliple ranges. Below I am adjsuting
the properties of one range. If I want to do this to two separate ranges,
can I append the With part of the statement to also take the second range
("SecondCell"). Thanks

With Range("FirstCell")
.Interior.Pattern = xlGray50
.Locked = True
.FormulaHidden = False
.Validation.InCellDropdown = False
End With
 
Try

With Range("FirstCell, SecondCell")
'do something here
End With

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top