+ Reply to Thread
Results 1 to 2 of 2

First row in Selection range (first index of a cell) EXCEL VBA

  1. #1
    mar_male@wp.pl
    Guest

    First row in Selection range (first index of a cell) EXCEL VBA

    Hello,
    I have a problem with selecting first cel in selection Range or return
    an index of the first cell in Selection Cell.

    I have something like this (VBA Code):
    ....................
    Range1.Select
    "and here I want to Select the first range in selection Range1"
    .............
    I there any special function of finding first cell in selection range
    or returning an index of the first cell??
    Thanks for answet
    Marcin


  2. #2
    Kevin Vaughn
    Guest

    RE: First row in Selection range (first index of a cell) EXCEL VBA

    You want the first cell in the range? You can use .range("a1") of the range.
    Here is a short example:

    Sub TestRange()
    Dim rng As Range
    Set rng = Range("a1", "d10")
    Debug.Print rng.Address
    Debug.Print rng.Range("a1").Address
    End Sub

    In the Immediate window shows:
    $A$1:$D$10
    $A$1
    Is that what you wanted?
    --
    Kevin Vaughn


    "mar_male@wp.pl" wrote:

    > Hello,
    > I have a problem with selecting first cel in selection Range or return
    > an index of the first cell in Selection Cell.
    >
    > I have something like this (VBA Code):
    > ....................
    > Range1.Select
    > "and here I want to Select the first range in selection Range1"
    > .............
    > I there any special function of finding first cell in selection range
    > or returning an index of the first cell??
    > Thanks for answet
    > Marcin
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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