I read somewhere while browsing the Net that one should always use "Range" rather than "Cells" when defining cell references. Can someone please explain why that would be the case?
I read somewhere while browsing the Net that one should always use "Range" rather than "Cells" when defining cell references. Can someone please explain why that would be the case?
Never heard that so I looked and found this.
It seems a trivial reason and I find Cells(i,j) much more flexible.A lot of VBA beginners start their career using Cells. For example:
Cells(1,1).Select is the same thing as Range("A1").Select and
Cells(11,31).Select is the same as Range("AE11").Select.
We strongly recommend that you use Range instead of Cells to work with cells and groups of cells. It makes your sentences much clearer and you are not forced to remember that column AE is column 31.
BTW j = Cells(1,"AE").Column, so we don't have to remember it.
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
Thanks. Makes sense.