+ Reply to Thread
Results 1 to 9 of 9

Formula so that a “Not on view” worksheet can dynamically reference the active worksheet

  1. #1
    Registered User
    Join Date
    12-28-2010
    Location
    London
    MS-Off Ver
    Excel 365
    Posts
    72

    Formula so that a “Not on view” worksheet can dynamically reference the active worksheet

    I have an idea with to assist in my other open issue

    https://www.excelforum.com/excel-for...te-ranges.html

    I want to explore having a “helper” worksheet not in view, that references the current active worksheet, dynamically changing as the worksheet selection changes

    I.e. when I’m viewing “Sheet 1”, “helper sheet” looks at the values of the sheet but stays in the background, and these references change when I view “Sheet 2”
    This would assist me in keeping the file size and performance manageable in having only 1 helper page (instead of many), so that I could reference and run tests against the “behind the scenes helper page”, calling the results back to be summarised on the sheet im viewing. Each time I view a different sheet the helper page dynamically re-references itself


    If anyone can share how to do this, it would be really appreciated.
    With thanks

  2. #2
    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,916

    Re: Formula so that a “Not on view” worksheet can dynamically reference the active workshe

    As this idea is related to your other thread, please post it in that thread. This duplicate thread is now closed.
    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.

  3. #3
    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,916

    Re: Formula so that a “Not on view” worksheet can dynamically reference the active workshe

    You have protested that this is a separate issue - I am not at all convinced that it is, but have reopened the thread. If it pertains to the other thread, then it would be best dealt with there - you are risking confusion between the two threads by dealing with it separately. I shall keep an eye on it - if such confusion ensues, then I shall cloise this thread once more.

  4. #4
    Registered User
    Join Date
    06-21-2017
    Location
    Missouri, USA
    MS-Off Ver
    2007 through 2019
    Posts
    71

    Re: Formula so that a “Not on view” worksheet can dynamically reference the active workshe

    In the attached workbook there is code that will keep track of the last active sheet and store that sheet name for use in a different subroutine. then there is a subroutine that will find and replace all the sheet references with references to the previously active sheet.
    This does not process in the background, but would allow you to make changes to your sheet then update this helper sheet to as you said run tests on it and then re-reference it to another updated sheet.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by SjMaxwell; 12-16-2018 at 11:00 AM.

  5. #5
    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,916

    Re: Formula so that a “Not on view” worksheet can dynamically reference the active workshe

    SJ Maxwell

    Sorry for off-topic interjection:

    Although there is no official rule regarding this behaviour, we request that wherever possible both the question AND the answer be provided in substantive detail here within the thread. An attached workbook is an excellent aid for posing a question and offering a solution, but solely doing that with no in thread explanation makes it difficult for researchers to understand or consider the Q & A of this thread without downloading what may be a pointless doc to them, if they can do that at all. Doing that also hides the content from search engines so others may never benefit from this.

  6. #6
    Registered User
    Join Date
    12-28-2010
    Location
    London
    MS-Off Ver
    Excel 365
    Posts
    72

    Re: Formula so that a “Not on view” worksheet can dynamically reference the active workshe

    Many thanks SJMaxwell, but I could not get this operating in the way I had in mind

    My VBA skills are pretty much non existent,
    I can get the active sheet to reference a cell on another (non visible) sheet
    But how can you do the other way round - get a non visible worksheet to access and reference a range of cells on the active worksheet
    This could populate a "helper worksheet" and the uses and possibilities of this approach are countless.

    Hope the attached help put into perspective what I try to describe
    Thanks again
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    12-28-2010
    Location
    London
    MS-Off Ver
    Excel 365
    Posts
    72

    Re: Formula so that a “Not on view” worksheet can dynamically reference the active workshe

    Decieded to use a compromise of a copy/paste approach (rather than a direct reference), - now need to find a sweat spot for the triggering event

    Please Login or Register  to view this content.
    plus any other areas needed etc....

    Works a charm but does disrupt a users workflow
    Last edited by AliGW; 12-22-2018 at 07:21 AM. Reason: Code tags added.

  8. #8
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Formula so that a “Not on view” worksheet can dynamically reference the active workshe

    Another method to find
    E4
    =IF(ISNUMBER(E5),"These dates overlap","")

    E5
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    But formula will get longer when you have more row of data, Blue part need to added from O2
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    12-28-2010
    Location
    London
    MS-Off Ver
    Excel 365
    Posts
    72

    Re: Formula so that a “Not on view” worksheet can dynamically reference the active workshe

    This is very clever - ironically I only became aware of the MMULT function about a month ago.
    Im not having a lot of luck with this one though - intersecting dates between the "from" column A and "To" column B appear to require an exact match
    if for example (and the crux of this thread) is when a date within a "Date" range intersects. eg
    From 1/1/2018 (A2) to 10/1/2018 (B2)
    needs to be considered for
    From 5/1/2018 (A3) to 5/1/2018 (B3)
    (as the 5th intersects the entries of row 2)
    REALLY curious of how this could be amended thought
    Also, the formula would be required on each sheet - ive over 30 sheets, each with three date ranges (1x20 rows, 2x110 rows)

    Currently im testing two approaches - the first has every day listed on every worksheet with a "lets see if this falls between any of the entered dates with a simple ">=from" +or "<=to" for each region
    This is currently making the file size larger than desired
    (ideally I would like a help page to reference the active sheet so that this is only needed to be entered once)

    Secondly I have the copy/past macro which drives an active X image to display. This requires the user to manually trigger the checking sequence though

    Working through this I'm discovering things that are so applicable to soooo many other tasks though, its been a very beneficial hurdle to have found myself against
    Thanks again

+ 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. Can i make the cont of a array dynamically by value on the active worksheet
    By glda19 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-02-2018, 02:54 PM
  2. [SOLVED] VBA Reference Cell On Different Worksheet Than Active Worksheet
    By Hoover5896 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-13-2018, 01:27 PM
  3. Replies: 4
    Last Post: 05-27-2018, 11:58 PM
  4. Reference active worksheet
    By DaveSmith2020 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-02-2016, 12:55 PM
  5. Dynamically add Worksheet / rename / update the formula to include the new worksheet
    By Rajnishbhatt in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-30-2012, 12:31 AM
  6. VBA: Reference cell dynamically on another worksheet
    By ssmith147 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-01-2009, 03:43 PM
  7. Altering code to reference the worksheet before the active worksheet
    By KimberlyC in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-15-2005, 07:06 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