+ Reply to Thread
Results 1 to 3 of 3

Selecting the first non blank cell in Range

  1. #1
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988

    Selecting the first non blank cell in Range

    Hi,

    Is the only way to select the first non blank cell in a range to use an if statement.

    e.g If D1 is the first cell in range A1 to F1 with info I want to return 1 for A to for B and so on. So D1 would return 4

    VBA Noob

  2. #2
    Bob Phillips
    Guest

    Re: Selecting the first non blank cell in Range

    Perhaps

    MsgBox Range("A1").End(xlToRight).Offset(0, 1).Column


    --
    HTH

    Bob Phillips

    (replace somewhere in email address with gmail if mailing direct)

    "VBA Noob" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi,
    >
    > Is the only way to select the first non blank cell in a range to use an
    > if statement.
    >
    > e.g If D1 is the first cell in range A1 to F1 with info I want to
    > return 1 for A to for B and so on. So D1 would return 4
    >
    > VBA Noob
    >
    >
    > --
    > VBA Noob
    > ------------------------------------------------------------------------
    > VBA Noob's Profile:

    http://www.excelforum.com/member.php...o&userid=33833
    > View this thread: http://www.excelforum.com/showthread...hreadid=564240
    >




  3. #3
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Thanks Bob

+ 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