+ Reply to Thread
Results 1 to 5 of 5

Range selection

  1. #1
    Registered User
    Join Date
    07-25-2019
    Location
    Klaipeda, Lithuania
    MS-Off Ver
    Microsoft® Excel® for Microsoft 365 MSO (Version 2410 Build 16.0.18129.20100) 64-bit
    Posts
    66

    Range selection

    Hello,

    There are two ways to select Range "B1" in VBA:
    Cells(1,2) or Range ("B1")

    I want to select a range "A1:B10". I can write:
    Range ("A1:B10").Select

    But how can I write this range using "cells"
    Cells([1,2:1,10)?

  2. #2
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    15,028

    Re: Range selection

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Good Luck...
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the [★ Add Reputation] to left of post window...
    Also....Add a comment if you like!!!!
    And remember...Mark Thread as Solved...
    Excel Forum Rocks!!!

  3. #3
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Range selection

    Please Login or Register  to view this content.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  4. #4
    Forum Expert ByteMarks's Avatar
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    3,176

    Re: Range selection

    For A1:B10 it'd be
    Please Login or Register  to view this content.

    Also a 3rd way
    Please Login or Register  to view this content.
    Last edited by ByteMarks; 09-24-2024 at 07:39 AM.

  5. #5
    Registered User
    Join Date
    07-25-2019
    Location
    Klaipeda, Lithuania
    MS-Off Ver
    Microsoft® Excel® for Microsoft 365 MSO (Version 2410 Build 16.0.18129.20100) 64-bit
    Posts
    66

    Re: Range selection

    Thank you. Works perfectly

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Repeating Fruits on selection or prompting to select range for selection
    By Ekac in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-05-2024, 09:30 AM
  2. is a range.address available to describe the selection in "Center Across Selection"
    By whburling in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-01-2023, 12:21 PM
  3. Need code for print and export for the dyanamic range selection if extended the data range
    By Pankaj jaswani in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-30-2022, 05:29 AM
  4. Replies: 3
    Last Post: 08-20-2021, 05:52 PM
  5. [SOLVED] I need help range selection and cells selection
    By venkatpvc in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-23-2013, 07:36 PM
  6. [SOLVED] Range(Selection, Selection.End(xlDown)).Select goes to 65536 instead of last filled row
    By looney in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 06-12-2013, 10:51 AM
  7. Replies: 2
    Last Post: 04-20-2012, 12:23 PM

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