+ Reply to Thread
Results 1 to 7 of 7

How to get the "Target.Address" address of the selected cell?

  1. #1
    Forum Contributor Rick_Stanich's Avatar
    Join Date
    11-21-2005
    Location
    Ladson SC
    MS-Off Ver
    Office365
    Posts
    1,167

    How to get the "Target.Address" address of the selected cell?

    I cant get the actual address of the cell that was selected from "Target.Address", am I going about this the wrong way?
    I am getting Target from:
    Please Login or Register  to view this content.
    Regards

    Rick
    Win10, Office 365

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,369

    Re: How to get the "Target.Address" address of the selected cell?

    Please Login or Register  to view this content.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,696

    Re: How to get the "Target.Address" address of the selected cell?

    Is this doing what you meant it to do:
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Contributor Rick_Stanich's Avatar
    Join Date
    11-21-2005
    Location
    Ladson SC
    MS-Off Ver
    Office365
    Posts
    1,167

    Re: How to get the "Target.Address" address of the selected cell?

    Thank you, that presents one of the two issues I was thinking of.
    1. Passing that variable to a Sub in a module "select_by_color(sColor)".
    2. Getting the address (you just solved this).

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2404
    Posts
    24,758

    Re: How to get the "Target.Address" address of the selected cell?

    I am curious as to why you need the address in the first place. I've seen cases where people think they need to use the address when what they really need is to directly reference a cell object. Could you show more context?
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  6. #6
    Forum Contributor Rick_Stanich's Avatar
    Join Date
    11-21-2005
    Location
    Ladson SC
    MS-Off Ver
    Office365
    Posts
    1,167

    Re: How to get the "Target.Address" address of the selected cell?

    My thought for the address.
    The macro which user JohnTopley originally helped me with has had a row added before row 3.
    Then I added more options to:
    Please Login or Register  to view this content.
    as
    Please Login or Register  to view this content.
    This causes two extra rows to be copied when I select cell "A3".
    I want to use the cell address for "A3" at selection to add code to remove the two rows based on the cell selected (A3).

    If cell A3 is selected, I need to remove 2 rows from another sheet where the data is being placed.
    Attached Images Attached Images
    Last edited by Rick_Stanich; 04-09-2024 at 10:06 AM.

  7. #7
    Forum Contributor Rick_Stanich's Avatar
    Join Date
    11-21-2005
    Location
    Ladson SC
    MS-Off Ver
    Office365
    Posts
    1,167

    Re: How to get the "Target.Address" address of the selected cell?

    Yes and no?
    It showed me how to get the address.

    I see now how my question did not encapsulate the entire need.

+ 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] If Target.Address = Range("NamedRange").Address Then - is a conflict with another
    By limewire in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-01-2022, 09:46 PM
  2. [SOLVED] If Target.Cells(1).Address = Range("$B$5": ..(?)..)
    By Marcin4111 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-22-2015, 06:57 AM
  3. [SOLVED] applying selected cell as variable for target address
    By mbrandt5 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-14-2015, 09:54 AM
  4. Two name comma separated in single cell to "email address"
    By jf44 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-06-2013, 10:51 PM
  5. Open files from FTP server (works with "servername" but doesn't work with "ip address")
    By adammsu1983 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-24-2012, 04:30 PM
  6. How to write cell address of the match in this , =IF(COUNTIF(A:A,B1)>0,"x","")
    By sureng19 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-24-2010, 08:03 PM
  7. Validate Data in VBA "How to get lost focus cell address"
    By HotRod in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-01-2005, 04:08 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