VBA Excel Range() with Cell argument

calendar_today Asked Jul 14, 2013
thumb_up 9 upvotes
history Updated April 16, 2026

Question posted 2013 · +5 upvotes

Why does the following not work:

Range(Cells(1,1)).Value = 3

Cells(1,1) should essentially be the same thing as using A1 right?

(I realize that I could just do Cells(1,1).Value = 3, but I’m just curious as to why it doesn’t work.)

I read the MSDN entry and it shows that the first argument must be A1 style, yet something like this does work:

Range(Cells(1,1), Cells(2,3)).Value = 2

Totally confused.

Accepted answer +9 upvotes

When Range is used with a single parameter, the parameter is is interpreted as a range name.

Range(Cells(1,1))

is the same as using

Range(Cells(1,1).Value)

So you will get a result only is the value of Cells(1,1) is a valid range address in A1 style

Only when passed two range parameters are they interpreted as the corners of a range.

2 code variants in this answer

  • Variant 1 — 1 lines, starts with Range(Cells(1,1))
  • Variant 2 — 1 lines, starts with Range(Cells(1,1).Value)

Top excel-vba Q&A (6)

+9 upvotes ranks this answer #73 out of 136 excel-vba solutions on this site .