+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    03-19-2010
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    3

    Create a Macro which shows precedents

    Dear All,

    Firstly, thank you very much for any replies!

    So, what I am trying to do is three things:

    Firstly, create a box which will appear when clicking on a cell containing my next two requests:

    Secondly, a macro to show precedents

    Thirdly, a macro to take those precedents, and say that if it is from sheet 1, row 23-35, column C, then call it March XYZ, as well as showing the number that was in Sheet 1, 23C.

    The macro to show precedents, is being used for:
    Lets say I have a figure that has been derived from 5 other places, then I would like a macro which shows where those 5 other places were, but as opposed to just saying Sheet1 C23, to say that was sheet 1 (Gold), Column C (Jeff's bid), between rows 23 and 50, i.e. its in the range of inputs for the month of March, and so it would say that the precedent was Gold, Jeff, March £15 for example, and this and all of the other precedents from which the number was derived would then appear in a box when the cell was clicked on.

    I would surmise that the Row 2 Column C Sheet 1 to be called XYZ would be an IF statement, however I do not really know how to code this, and I sadly have no idea how to do the precedents or make the click box....

    I am asking because this seems to me to be hideously complex, (and maybe impossible ) but if someone could help me out, I would be inestimably grateful!

    Thank you again for any and all replies,

    Freddie

  2. #2
    Forum Moderator shg's Avatar
    Join Date
    06-21-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2007
    Posts
    25,137

    Re: Create a Macro which shows precedents

    Have you tried just using the Formula Auditing toolbar, and watching the formula evaluate step by step?
    Microsoft MVP - Excel
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    03-19-2010
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Create a Macro which shows precedents

    thanks for the quick reply!
    That is sadly not useful in this case, as the excel worksheet spans multiple sheets and 700 rows per sheet, so I sadly cannot remember exactly which sections equate to each cell, which is why a renaming macro along with a hover box would be hugely helpful.
    f

  4. #4
    Forum Moderator shg's Avatar
    Join Date
    06-21-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2007
    Posts
    25,137

    Re: Create a Macro which shows precedents

    It's very complicated to find off-sheet references. The object model requires that you do essentially the same thing that you do manually: click the precedents button and then click arrows.

    Good luck.
    Microsoft MVP - Excel
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Registered User
    Join Date
    03-19-2010
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Create a Macro which shows precedents

    its not off sheet, i.e. they are all in the same .xls file, just in different tabs
    f

  6. #6
    Forum Moderator shg's Avatar
    Join Date
    06-21-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2007
    Posts
    25,137

    Re: Create a Macro which shows precedents

    That's what off-sheet means.
    Microsoft MVP - Excel
    Entia non sunt multiplicanda sine necessitate

  7. #7
    Forum Guru mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    2,929

    Re: Create a Macro which shows precedents

    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  8. #8
    Forum Guru
    Join Date
    01-03-2006
    Location
    Basingstoke, England
    MS-Off Ver
    2007 (work & home)
    Posts
    2,240

    Re: Create a Macro which shows precedents

    hi all,

    Great link Mike :-)
    It looks very comprehensive & I've bookmarked it for a more thorough read.

    pmfreddie,
    Welcome to the Forum
    An alternative to Mike's code may be Aaron Blood's "explode.xla" - I'm not sure if it is as comprehensive as Mike's code but it is conveniently wrapped up in a userform/display/UI.

    If the first link to Explode doesn't work, you can find it about two thirds of the way down http://www.xl-logic.com/modules.php?name=Downloads

    hth
    Rob
    Rob Brockett
    Kiwi in the UK
    Always learning & the best way to learn is to experience...

  9. #9
    Forum Moderator shg's Avatar
    Join Date
    06-21-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2007
    Posts
    25,137

    Re: Create a Macro which shows precedents

    Nice work, Mike. I didn't test it, but the code looks good.
    Microsoft MVP - Excel
    Entia non sunt multiplicanda sine necessitate

Thread Information

Users Browsing this Thread

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

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.2.0