+ Reply to Thread
Results 1 to 5 of 5

Formula trace

  1. #1
    Registered User
    Join Date
    12-16-2023
    Location
    bristol ga
    MS-Off Ver
    2013
    Posts
    3

    Formula trace

    I have a huge spreadsheet for estimating material. Within many cells are formulas that return quantities of material based on values entered in cells on another sheet.
    I am in the stage of troubleshooting the formulas and want to know if there is a function in excel that would allow me to select a cell and see the formula, AND it would highlight the actual parts of the formula that the answer is based upon.
    Here is an sample formula that provides the quantity of 2x4x92 5/8" pieces for a specific wall section. The references to indexing a table are to calculate the quantity of pieces for a specific length beam. I have looked at the floorplan and manually counted the pieces and find the formula is too high by almost 34%. AND if it is calculating for a beam, in this particular case there is no beam required.
    The answer in this example is 12. That is 12 studs for a 6' long wall with 16" o.c. spacing and no doors. Based on floorplan there should only need to be 6 studs plus top and bottom plates

    =IF(AND(Tasks!H8="y",Tasks!H9=4,Tasks!H10>0,Tasks!H11<=96,Tasks!H22="F"),ROUNDUP((Tasks!H10/92.625)*3,0)+ROUNDUP(((Tasks!H10/Tasks!H38))+1,0),0)+IF(AND(Tasks!H9=4,ROUNDUP(Tasks!H10/12,0)>0),INDEX(Tasks!$CB$3:$CE$94,MATCH(ROUNDUP(Tasks!H$10/12,0),Tasks!$CA$3:$CA$94,0),MATCH(Tasks!$CH2,Tasks!$CB$2:$CE$2,0))*Tasks!H39,0)

    Referencing the Tasks sheet:
    H8=build wall, yes or no
    H9= size of stud (2x4, 2x6, etc)
    H10=length of wall in inches (example is 72)
    H11=wall height. In this case it sets stud length required to be 92 5/8. This is to conserve on waste, no sense chopping up 8' long studs when 92 5/8 is adequate.
    H22=type of wall construction (Framed, Poured concrete, Concrete block) in this case it is Framed
    H38=stud spacing, in this case 16"
    H39=number of plates, 2 or 3. In this case 3

    So, is there a way to click on the formula cell and have the parts of formula that are used to calculate the result highlighted?

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: Formula trace

    Welcome to the forum

    Please attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  3. #3
    Registered User
    Join Date
    12-16-2023
    Location
    bristol ga
    MS-Off Ver
    2013
    Posts
    3

    Re: Formula trace

    I cannot post a sample workbook. It is 21.4MB in size and it also contains proprietary information.
    People with knowledge of what I am looking for can certainly interpret my original post, and could pose questions regarding it, without having the entire workbook available. Attached below is the Beam table referenced in the formula that SHOULD NOT have a bearing on this as there is no beam required. The length column is the desired beam length in feet, and the numbers 8 10 12 16 reference common lumber lengths in feet. Therefore if a 2x4 beam needed to be 8' long or less it would use a single 2x4x8', or a 2x6 beam 33' long would use a single 2x6x10' and two 2x6x12' achieving a total of 34' with minimum waste.
    And I am sorry this reply is difficult to read as the cell spacing was not retained. I am probably pasting it wrong but do not know any better.

    Beam table
    length 8 10 12 16 8 10 12 16
    2 1 2x4
    3 1 2x4
    4 1 2x4
    5 1 2x4
    6 1 2x4
    7 1 2x4
    8 1 2x4
    9 1 2x4
    10 1 2x4
    11 1 2x4
    12 1 2x4
    13 1 2x4
    14 1 2x4
    15 1 2x4
    16 1 2x4
    17 1 1 2x4
    18 1 1 2x4
    19 1 1 2x6
    20 1 1 2x6
    21 1 1 2x6
    22 1 1 2x6
    23 1 1 2x6
    24 1 1 2x6
    25 1 1 2x6
    26 1 1 2x6
    27 1 1 2x6
    28 1 1 2x6
    29 3 2x6
    30 3 2x6
    31 2 2x6
    32 2 2x6
    33 1 2 2x6
    34 1 2 2x6
    35 3 2x6
    36 3 2x6
    37 1 2 2x6
    38 1 2 2x6
    39 1 2 2x6
    40 1 2 2x6
    41 1 2 2x6
    42 1 2 2x6
    43 1 2 2x6
    44 1 2 2x6
    45 3 2x6
    46 3 2x6
    47 3 2x6
    48 3 2x6
    49 5 2x6
    50 5 2x6
    51 1 3 2x6
    52 1 3 2x6
    53 1 3 2x6
    54 1 3 2x6
    55 1 3 2x6
    56 1 3 2x6
    57 1 3 2x6
    58 1 3 2x6
    59 5 2x6
    60 5 2x6
    61 4 2x6
    62 4 2x6
    63 4 2x6
    64 4 2x6
    65 5 1 2x6
    66 5 1 2x6
    67 1 5 2x6
    68 1 5 2x6
    69 1 5 2x6
    70 1 5 2x6
    71 1 4 2x6
    72 1 4 2x6
    73 1 4 2x6
    74 1 4 2x6
    75 1 4 2x6
    76 1 4 2x6
    77 5 2x6
    78 5 2x6
    79 5 2x6
    80 5 2x6

  4. #4
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Formula trace

    want to know if there is a function in excel that would allow me to select a cell and see the formula, AND it would highlight the actual parts of the formula that the answer is based upon
    clicking on the cell shows the formula in the function window at the top, going to formulas at the top of the workbook there is a function/feature called trace precedents that shows which cells on that tab and little boxes for the cells located on other tabs - which if you click on them they show the details.
    Is that what you need?
    Last edited by AliGW; 12-17-2023 at 11:47 AM. Reason: Quote tags fixed.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  5. #5
    Registered User
    Join Date
    12-16-2023
    Location
    bristol ga
    MS-Off Ver
    2013
    Posts
    3

    Re: Formula trace

    Thank you Sam. But that did not do what I expected. All I saw was a mini spreadsheet icon with an arrow pointing to the formula. I saw nothing to click that would show me the exact expression or value being linked.
    I tried the Evaluate Formula function and that took me closer to what I need, but still not enough.
    What would be nice is to have a small window pop up which lists every part of the formula and the result on a separate line. That would then make it easier to see how the final result was calculated. Sure, I could step thru it by evaluating it in my head and writing it down, but having the PC do it would be faster.
    Using my example:
    =IF(AND(Tasks!H8="y",Tasks!H9=4,Tasks!H10>0,Tasks!H11<=96,Tasks!H22="F"),ROUNDUP((Tasks!H10/92.625)*3,0)+ROUNDUP(((Tasks!H10/Tasks!H38))+1,0),0)+IF(AND(Tasks!H9=4,ROUNDUP(Tasks!H10/12,0)>0),INDEX(Tasks!$CB$3:$CE$94,MATCH(ROUNDUP(Tasks!H$10/12,0),Tasks!$CA$3:$CA$94,0),MATCH(Tasks!$CH2,Tasks!$CB$2:$CE$2,0))*Tasks!H39,0)

    Referencing the Tasks sheet:
    H8=build wall, yes or no
    H9= size of stud (2x4, 2x6, etc)
    H10=length of wall in inches (example is 72)
    H11=wall height. In this case it sets stud length required to be 92 5/8. This is to conserve on waste, no sense chopping up 8' long studs when 92 5/8 is adequate.
    H22=type of wall construction (Framed, Poured concrete, Concrete block) in this case it is Framed
    H38=stud spacing, in this case 16"
    H39=number of plates, 2 or 3. In this case 3

    Going expression by expression:
    H8="Y" is true
    H9=4
    H10=72 so it is >0
    H11=94 so it is <96
    H22="F" is true
    H38=16
    H39=3
    The formula is located in the line that is for the 92 5/8" studs therefore the expression ROUNDUP((Tasks!H10/92.625)*3,0) is used. The next line on sheet is for 96" studs so that expression would be changed to ROUNDUP((Tasks!H10/96)*3,0)
    Next part of formula +ROUNDUP(((Tasks!H10/Tasks!H38))+1,0),0) divides length of wall by the stud spacing, rounds it up, then adds 1 more for the end stud.
    And I now see a couple errors. First error is the expression ROUNDUP((Tasks!H10/92.625)*3,0). This calculates the number of plates needed, but it never references the number provided in H39, it just assumes 3 plates.
    Next error is that the expression at the end of formula calculates the number of studs needed to create a beam of the length specified by H10, but there is no beam required to build a wall, so I need to remove that.
    Explaining it to you folks has helped a lot!

+ 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. Formula Trace Symbol
    By HFDS006 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-07-2018, 11:20 AM
  2. [SOLVED] How to reverse trace a formula
    By Beach Walker in forum Excel General
    Replies: 3
    Last Post: 08-24-2014, 12:03 PM
  3. [SOLVED] Trace formula result
    By Ztv in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-25-2014, 11:03 AM
  4. [SOLVED] Protect sheet but allow trace precedents / trace dependents?
    By abchak1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-16-2013, 10:32 AM
  5. How to trace a formula error?
    By SueWithQuestion in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-03-2012, 08:26 AM
  6. Trace dependent does not work, trace precedent does
    By marnie in forum Excel General
    Replies: 0
    Last Post: 05-23-2007, 12:50 PM
  7. [SOLVED] Excel Trace Formula
    By cgrant in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-17-2005, 03:05 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