Apr 27, 2021 #1 wmbb Technical User Joined Jul 17, 2005 Messages 320 Location NL 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...
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...
Apr 27, 2021 #2 Andrzejek Programmer Joined Jan 10, 2006 Messages 8,576 Location US From Referring to Excel Ranges [tt] ActiveSheet.Range(Cells(2, 2), Cells(5, 5)).Interior.Color = vbYellow [/tt] Makes Range B2-E5 yellow ---- Andy "Hmm...they have the internet on computers now"--Homer Simpson Upvote 0 Downvote
From Referring to Excel Ranges [tt] ActiveSheet.Range(Cells(2, 2), Cells(5, 5)).Interior.Color = vbYellow [/tt] Makes Range B2-E5 yellow ---- Andy "Hmm...they have the internet on computers now"--Homer Simpson
May 2, 2021 #3 S SkipVought Programmer Joined Dec 4, 2001 Messages 47,492 Location US You might try, Code: With ActiveSheet Union(Range(.Cells(5, 1), .Cells(5, 2)), Range(.Cells(5, 4), .Cells(5, 39))) End With Skip, Just traded in my OLD subtlety... for a NUance! "The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein Upvote 0 Downvote
You might try, Code: With ActiveSheet Union(Range(.Cells(5, 1), .Cells(5, 2)), Range(.Cells(5, 4), .Cells(5, 39))) End With Skip, Just traded in my OLD subtlety... for a NUance! "The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein
May 9, 2021 Thread starter #4 wmbb Technical User Joined Jul 17, 2005 Messages 320 Location NL Thank you SkipVought, You've pushed me in the right direction ;-) Upvote 0 Downvote
May 10, 2021 #5 Andrzejek Programmer Joined Jan 10, 2006 Messages 8,576 Location US 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 Upvote 0 Downvote
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
May 18, 2021 #6 remeng Technical User Joined Jul 27, 2006 Messages 525 Location US 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 Upvote 0 Downvote
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