+ Reply to Thread
Results 1 to 3 of 3

Referring to Active Cell Selection

  1. #1
    Registered User
    Join Date
    05-28-2011
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    2

    Referring to Active Cell Selection

    Hi

    I want to refer to the current selection of cells in my Macro (whatever length that selection may be).

    Range("A5").Value = Range(&Selected&)

    I have currently come up with that (just for getting 1 selected cell value to appear in another cell. It is not working however.

    The ultimate goal is to get a macro to insert a formula into a cell that says.

    "=Count("INSERT THE MISSING FUNCTION REFERRING TO CURRENTLY ACTIVE SELECTED CELLS HERE")

    I can do everything but the bit in caps

    Thank you in advance
    Last edited by Toby.Leheup; 05-28-2011 at 06:46 AM.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434

    Re: Referring to Active Cell Selection

    Assuming the selected range is A1:A4 then this will in B1 add the formula
    =COUNT(A1:A4)

    Please Login or Register  to view this content.
    Alter the false arguments to true to get variation absolute references to the selection
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    05-28-2011
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Referring to Active Cell Selection

    Spot On!

    Good Man and Thankyou

+ 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