+ Reply to Thread
Results 1 to 6 of 6

send value of cell in ACTIVE SHEET to a different sheet

Hybrid View

  1. #1
    Registered User
    Join Date
    02-03-2009
    Location
    New Jersey
    MS-Off Ver
    Excel 2003
    Posts
    8

    send value of cell in ACTIVE SHEET to a different sheet

    I have 2 worksheets that are pretty similar in design and layout, but different enough to be separate and used for different scenario comparisons. I also have a third worksheet (called calculations) that preforms various calculations that are then used in the original 2 sheets. There is only 1 value that is "sent" (by "sent' I mean cell B5 in the calculations sheet refers to a cell in one of the other sheets to grab that value in it) to the calculations sheet and then it preforms those various other calculations based on that one value. What I need is for the value of cell B5 in the calculations sheet to refer to whatever "active" sheet I am on. This sounds more confusing that what it really is. An example might explain it more...

    Sheet 1 and Sheet 2 are similar in layout. In the Calculations sheet, cell B5 is currently referred to cell C6 in sheet 1 (='sheet1'!C6). My problem is, if I am VIEWING Sheet 2 I need the reference in the calculations sheet to be 'Sheet2'!C6, but if VIEWING sheet 1 have the reference be 'Sheet1!C6. The point of this is to "send" the right value for further calculations based on the active viewed sheet.

    Is this possible and how do I do it

    Thanks

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: send value of cell in ACTIVE SHEET to a different sheet

    You could have a "worksheet activate event" for each of Sheet1 and Sheet2 so that when you select them the value on the calculations sheet changes.

    BSB

  3. #3
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: send value of cell in ACTIVE SHEET to a different sheet

    The attached will change the value in C5 on the Calculation sheet depending on which sheet (1 or 2) you select.

    To see how it's done, right click the tab at the bottom of Sheet1 or Sheet2 and select "View Code".

    Hope that helps.

    BSB
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    02-03-2009
    Location
    New Jersey
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: send value of cell in ACTIVE SHEET to a different sheet

    Thanks but there are two problems... First the sample you provided doesn't seem do what I need. As a matter of fact it doesn't seem to do anything at all. I don't know if there was just a simple error in the design or you misunderstood what I need.
    Second, I would like if at all possible, NOT use VBA. I will be viewing this also with my iPhone and the Numbers app and that does not support workbooks using VBA.

    If there were an imaginary function that competed this task it would look like this:
    in cell B5 of the Calculations sheet would be: =if(the name of the current worksheet in view"="Sheet1,Then:'sheet1'!C6, Else:'sheet2'!C6

    Obviously this would not work, but is there a function that can calculate what that literally says?

  5. #5
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: send value of cell in ACTIVE SHEET to a different sheet

    I can assure you it does do something. The value on the Calculations sheet changes to either Sheet1 or Sheet2, depending on which one you were viewing just before looking at the calculations sheet. It was merely a demonstration of how it could be done, you would need to adapt it to your own workbook.
    But as you now mention you're looking for a non-VBA approach that is a moot point.

    For what it's worth, I'm not sure there is a non-VBA solution to this.

    BSB

  6. #6
    Registered User
    Join Date
    02-03-2009
    Location
    New Jersey
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: send value of cell in ACTIVE SHEET to a different sheet

    Never mind... Thanks, it works. I had this whole description on how it wasn't working, and about to send it to you, but then last minute I realized that I never clicked to enable the macros upon open of the workbook.

+ 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. Send active sheet ( Sendmail)
    By donkey_uk in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-08-2014, 11:49 AM
  2. [SOLVED] save active sheet in new workbook, naming it as cell value of active sheet
    By arkharova.s in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-18-2014, 06:16 AM
  3. Replies: 2
    Last Post: 07-31-2012, 10:00 PM
  4. Send Email From Active Sheet
    By dentdntn in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-02-2012, 05:23 AM
  5. Send the mail from an active sheet - VB code for macro
    By Geetha Ramakrishnan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-11-2011, 07:23 AM
  6. Copy from active sheet and paste into new sheet using info from cell in active
    By Ingve in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-23-2006, 06:00 PM
  7. [SOLVED] Send Email (Active Sheet)
    By Murtaza in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-25-2005, 09:06 AM

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