×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Range definition using Cells

Range definition using Cells

Range definition using Cells

(OP)
How do I write the range ActiveSheet.Range(A5:B5,D5:AM5) using the cells notation ?
I want to define the range using row numbers and column numbers...

RE: Range definition using Cells

From Referring to Excel Ranges

ActiveSheet.Range(Cells(2, 2), Cells(5, 5)).Interior.Color = vbYellow

Makes Range B2-E5 yellow

---- Andy

"Hmm...they have the internet on computers now"--Homer Simpson

RE: Range definition using Cells

You might try,

CODE

With ActiveSheet
   Union(Range(.Cells(5, 1), .Cells(5, 2)), Range(.Cells(5, 4), .Cells(5, 39)))
End With 

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

"The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein

RE: Range definition using Cells

(OP)
Thank you SkipVought,
You've pushed me in the right direction winky smile

RE: Range definition using Cells

Did you solve your issue? If so, would you mind sharing it here for the benefit of others?

---- Andy

"Hmm...they have the internet on computers now"--Homer Simpson

RE: Range definition using Cells

If you want to make your life a little easier in determining the R1C1 value, you can switch the excel worksheets to R1C1 instead of Letter Row format.

Link

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close