Closed Thread
Results 1 to 11 of 11

formula to display current active cell in $A$1

  1. #1
    Forum Contributor
    Join Date
    06-08-2012
    Location
    Panama City, FL
    MS-Off Ver
    Excel 2016
    Posts
    175

    formula to display current active cell in $A$1

    Hello friends,
    While I know that Address(Row(),Column()) will display the cell address where it is entered, I need to put a similar formula in $A$1 that will list the current active cell.
    For example, if I select B3 then $B$3 would appear in $A$1. If I next select E8, then $E$8 would appear in $A$1.
    Is this even possible? If so, please share your knowledge with me.
    Thanks kindly!

  2. #2
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    Re: formula to display current active cell in $A$1

    Put into sheet code:

    Please Login or Register  to view this content.
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

  3. #3
    Forum Contributor
    Join Date
    06-08-2012
    Location
    Panama City, FL
    MS-Off Ver
    Excel 2016
    Posts
    175

    Re: formula to display current active cell in $A$1

    Thanks so much for the quick response KOKOSEK - unfortunately, it doesn't do anything.
    I entered the VBA and saved it (and opened it again to confirm it's still there). Am I supposed to do something to make it run? I'm hoping it will automatically change the value in A1 every time a different cell is selected. Thanks again.

  4. #4
    Forum Expert dosydos's Avatar
    Join Date
    12-09-2015
    Location
    Massachusetts
    MS-Off Ver
    365(PC) V:2308
    Posts
    1,472

    Re: formula to display current active cell in $A$1

    you could use
    =CELL("address") in cell A1

    this only will update though if you double click on another cell or select a cell and hit F2 and enter

  5. #5
    Forum Expert Roel Jongman's Avatar
    Join Date
    03-28-2015
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    1,483

    Re: formula to display current active cell in $A$1

    kosokek code is fine. You probably put it in the wrong place.

    The code he gave is an event macro that needs to be placed in the sheet module that you want this to happen (to show activecell in A1)

    please see attached example for the correct location of code (and that it does work)
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    06-08-2012
    Location
    Panama City, FL
    MS-Off Ver
    Excel 2016
    Posts
    175

    Re: formula to display current active cell in $A$1

    Thanks for the attachment Roel. You are obviously correct, it does work. It looks identical to the one in my module that doesn't work - I'll figure it out. Have a great day!

  7. #7
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    Re: formula to display current active cell in $A$1

    Quote Originally Posted by GregM56 View Post
    Thanks for the attachment Roel. You are obviously correct, it does work. It looks identical to the one in my module that doesn't work - I'll figure it out. Have a great day!
    I said put into sheet code. When you have put into Module it did not work.

  8. #8
    Forum Contributor
    Join Date
    06-08-2012
    Location
    Panama City, FL
    MS-Off Ver
    Excel 2016
    Posts
    175

    Re: formula to display current active cell in $A$1

    Hello again guys . . . the help provided does work and I thank you.
    Unfortunately, I'm unable to use it as needed because I'm just not quite smart enough to figure out how.
    I have tried to attach the spreadsheet from Roel that I edited in my attempt to answer the primary question, but I must not have permission to do so. It allowed me to upload it but when I press the attach button it does nothing.
    The ultimate goal is to enter a formula on Sheet2 to retrieve the value of the active cell on Sheet1.
    Since
    Please Login or Register  to view this content.
    identifies the address of the active cell on Sheet1, the formula in Sheet2 would look at
    Please Login or Register  to view this content.
    and goto the address displayed and return whatever value is in that active cell.
    I tried:
    Please Login or Register  to view this content.
    but it only gives me the address of the active cell $B$4.
    I tried
    Please Login or Register  to view this content.
    and get a #REF! error. I'm baffled.
    Just to test, I entered
    Please Login or Register  to view this content.
    and it gives me that value I need, "GregM".
    Again, all help is greatly appreciated.
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    06-08-2012
    Location
    Panama City, FL
    MS-Off Ver
    Excel 2016
    Posts
    175

    Re: formula to display current active cell in $A$1

    Okay, so I figure out that [code]INDIRECT("'"&A6&"'!"&INDIRECT("'"&A6&"'!"&"A1")){/code] will work for the problem. Now I'll go to a new post to ask for help
    to be able to replace A6 in this formula with "Sheet1" (I put in the word Sheet1 in A6).
    This original question is SOLVED. Thanks to all who helped!

  10. #10
    Registered User
    Join Date
    06-02-2020
    Location
    Thailand
    MS-Off Ver
    2013
    Posts
    8

    Re: formula to display current active cell in $A$1

    Hi Roel,

    I already have another code in the sheet and I want to add this too.. Can you help me please?

    My existing code is

    Private Sub Worksheet_Change(ByVal Target As Range)

    If Target.Row = 3 And Target.Column = 6 Then

    Application.EnableEvents = False

    Sheets("List").Range("F4").Value = [=IFERROR(VLOOKUP($F$3,Data!$A$1:$C$7,2,0),"")]

    Sheets("List").Range("F5").Value = [=IFERROR(VLOOKUP($F$3,Data!$A$1:$C$7,3,0),"")]


    End If

    Application.EnableEvents = True


    End Sub

    Thanks in advance.

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: formula to display current active cell in $A$1

    Administrative Note:

    Welcome to the forum.

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 22
    Last Post: 01-26-2016, 07:43 AM
  2. Way to highlight current active cell?
    By Carrfamily in forum Excel General
    Replies: 5
    Last Post: 05-08-2015, 07:07 PM
  3. How to find out the current active cell formula?
    By alexduy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-04-2015, 05:52 PM
  4. [SOLVED] copy and paste in current active cell, and need current date then scroll down 140 lines
    By vengatvj in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-04-2013, 03:40 AM
  5. [SOLVED] Need a complicated formula to display part of current workbook name in a cell
    By ianpwilliams in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 07-06-2013, 01:41 PM
  6. [SOLVED] Set variable to active cell's current Data validaion formula?
    By magicbob007 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-21-2012, 05:54 PM
  7. [SOLVED] VBA - Can I select a new active cell based on the value of the current active cell?
    By GrumpyOldBastard in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-08-2012, 07:05 PM

Tags for this Thread

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