+ Reply to Thread
Results 1 to 9 of 9

Referencing value from Active cell of another sheet

  1. #1
    Registered User
    Join Date
    07-14-2012
    Location
    Haryana, India
    MS-Off Ver
    Excel 2003
    Posts
    16

    Referencing value from Active cell of another sheet

    Hi

    I want value in Cell "B2" of "Sheet2" and "Sheet 3" to have the value as active cell in "column C" of "Sheet1".

    Please help

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Referencing value from Active cell of another sheet

    Hi Hitesh,

    Try using below code:-
    Please Login or Register  to view this content.
    Regards,
    DILIPandey
    <click on below * if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Referencing value from Active cell of another sheet

    This will work with a macro-enabled workbook. Install the following event macro in the worksheet code area of Sheet1:

    Please Login or Register  to view this content.
    Then in any other sheet, enter:

    =ActiveC

    to display the value in the active cell in Sheet1


    Because it is worksheet code, it is very easy to install and automatic to use:

    1. right-click the tab name near the bottom of the Excel window
    2. select View Code - this brings up a VBE window
    3. paste the stuff in and close the VBE window

    If you have any concerns, first try it on a trial worksheet.

    If you save the workbook, the macro will be saved with it.
    If you are using a version of Excel later then 2003, you must save
    the file as .xlsm rather than .xlsx

    To remove the macro:

    1. bring up the VBE windows as above
    2. clear the code out
    3. close the VBE window

    To learn more about macros in general, see:

    http://www.mvps.org/dmcritchie/excel/getstarted.htm

    To learn more about Event Macros (worksheet code), see:

    http://www.mvps.org/dmcritchie/excel/event.htm

    Macros must be enabled for this to work!
    Gary's Student

  4. #4
    Registered User
    Join Date
    07-14-2012
    Location
    Haryana, India
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Referencing value from Active cell of another sheet

    Hi Dilip

    Thanx

    I believe this is a macro.

    Actually I do not want a macro. I want it to be more dynamic.

    Such that I select a cell in "Sheet1" and then select "Sheet2" and that should have the value of active cell of sheet1

  5. #5
    Registered User
    Join Date
    07-14-2012
    Location
    Haryana, India
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Referencing value from Active cell of another sheet

    Hi Jakob

    Its not working. Should I paste "=ActiveC" in the cell "B2" of "Sheet2"? or I am doing it wrong?

  6. #6
    Registered User
    Join Date
    07-14-2012
    Location
    Haryana, India
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Referencing value from Active cell of another sheet

    I was using this code. It is working good for odd numbered rows and not working for even numbered rows.
    Also, this is for one sheet, I want it for 2 sheets
    This code was pasted on VBE for Sheet1

    Please Login or Register  to view this content.

  7. #7
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Referencing value from Active cell of another sheet

    See the attached:
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    07-14-2012
    Location
    Haryana, India
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Referencing value from Active cell of another sheet

    Thanx Jakob

    Earlier, I didn't named "Column C" Range. Its working good now.

    In Cell "B2" of "Sheet2" I actually have a Drop down list for the "Column C" values of "Sheet1". So if I use drop down list. after that it doesn't work as the value gets changer from "=ActiveC" to the value chosen from dropdown list.

  9. #9
    Registered User
    Join Date
    07-14-2012
    Location
    Haryana, India
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Referencing value from Active cell of another sheet

    Ultimately using a mix of codes suggested by Dilip and Jakob.

    Used Dilip's macro.

    and getting the macro trigger as soon as their is change in slection, as suggested by Jakob

    Thanx Guyz.


+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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