+ Reply to Thread
Results 1 to 9 of 9

How to return address of the column or cell I select, not just return the value?

Hybrid View

  1. #1
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: How to return address of the column or cell I select, not just return the value?

    If you click okay with a blank inputbox its going to tell you your input is incorrect and give you the option to correct (native function of inputbox).

    Your only options will be input a range and click okay or hit cancel and exit.

    Dim categorycolumn As Long
    
    On Error Resume Next
    categorycolumn = Application.InputBox("Which column do you want select?", "Column", Type:=8).Column
    On Error GoTo 0
    
    If categorycolumn > 0 Then
        MsgBox categorycolumn
    End If


    e/ I just noticed the title says return the ADDRESS of the column or cell you selected and not the column number. Are you looking for the address of the selected cell (i.e. C5)?

    Sorry for not paying attention.
    Last edited by Solus Rankin; 08-18-2014 at 02:02 PM.
    Thanks,
    Solus


    Please remember the following:

    1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    Highlight the code in your post and press the # button in the toolbar.
    2. Show appreciation to those who have helped you by clicking below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

    "Slow is smooth, smooth is fast."

  2. #2
    Registered User
    Join Date
    08-07-2014
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    95

    Re: How to return address of the column or cell I select, not just return the value?

    It's ok. Actually, you already solved my next step. The address I was looking for actually is for returning the Column number.
    But, could you please tell me how to return address as well? I appreciate for your helping.

+ 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. return cell address of a max
    By sandsoppa in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-15-2012, 04:18 PM
  2. Search...Return...give info based on the return address
    By deek1004 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-11-2012, 03:36 PM
  3. Replies: 3
    Last Post: 07-27-2011, 02:29 PM
  4. Replies: 1
    Last Post: 03-21-2006, 09:15 AM
  5. [SOLVED] return a cell address?
    By green fox in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-20-2005, 01:30 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