Another way of writing a range in excel

Chris6629

New Member
Joined
Sep 22, 2014
Messages
4
'A range in Summary Tab
Sheets("Summary").Range("A3:A35") 'first way

'It can also be written in another way using Cells (x,y)
Sheets("Summary").Range(Cells(3,1),Cells(35,1)) 'another way

'Another range in Summary Tab
Sheets("Summary").Range("A3:A35,JA3:JA35")

'Question : How this range can be witten in the other way? Using Cells(x,y)?

Thanks you
Chris6629
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
This is not correct:
Code:
Sheets("Summary").Range(Cells(3,1),Cells(35,1))
It should be:
Code:
Sheets("Summary").Range(Sheets("Summary").Cells(3,1),Sheets("Summary").Cells(35,1))

You can't directly convert your final example, you have to use Union:
Code:
Union(Sheets("Summary").Range(Sheets("Summary").Cells(3,1),Sheets("Summary").Cells(35,1)), Sheets("Summary").Range(Sheets("Summary").Cells(3,"JA"),Sheets("Summary").Cells(35,"JA")))
 
Upvote 0
You can't directly convert your final example, you have to use Union:
Code:
Union(Sheets("Summary").Range(Sheets("Summary").Cells(3,1),Sheets("Summary").Cells(35,1)), Sheets("Summary").Range(Sheets("Summary").Cells(3,"JA"),Sheets("Summary").Cells(35,"JA")))
This kind of matches what the OP was asking for (the Resize is "new") and seems to work as well...

Code:
Sheets("Summary").Range(Sheets("Summary").Cells(3,1).Resize(33).Address & "," & Sheets("Summary").Cells(35,10).Resize(33).Address)
 
Upvote 0

Forum statistics

Threads
1,214,614
Messages
6,120,530
Members
448,969
Latest member
mirek8991

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top