+ Reply to Thread
Results 1 to 3 of 3

How to reference cells in VBA

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    09-25-2012
    Location
    Ventura, united States
    MS-Off Ver
    Excel 2010
    Posts
    346

    How to reference cells in VBA

    How can I reference a range using the cells property? I know how to refer to one cell, but not a group. Here's my attempt:


    Range("A1:A10").select   =    Cells(1,1:10,1).select
    my attempt sucks-

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,303

    Re: How to reference cells in VBA

    How about for A1 to J1 would be:

    Range(Cells(1,1),Cells(1,10)).Select
    Or
    A1 to A10 would be:
    Range(Cells(1,1),Cells(10,1)).Select
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Contributor
    Join Date
    09-25-2012
    Location
    Ventura, united States
    MS-Off Ver
    Excel 2010
    Posts
    346

    Re: How to reference cells in VBA

    Yep. Perfecto!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1