Results 1 to 4 of 4

Cannot make nested if's work

Threaded View

rfcomm2k Cannot make nested if's work 12-18-2014, 12:13 PM
protonLeah Re: Cannot make nested if's... 12-18-2014, 07:15 PM
rfcomm2k Re: Cannot make nested if's... 12-19-2014, 09:42 AM
rfcomm2k Re: Cannot make nested if's... 12-19-2014, 09:53 AM
  1. #1
    Registered User
    Join Date
    03-20-2009
    Location
    Phila, PA
    MS-Off Ver
    Excel 2003
    Posts
    56

    Cannot make nested if's work

    I have a formula that works but is incorrect. It is for calculating how many 2x4's I need to build a wall.
    On a sheet called Tasks I have the following:
    Cell use
    B7 Build wall Yes or No
    B8 4" or 6" wall
    B9 length of wall in inches
    B10 height of wall in inches
    B20 Need bottom plate to be pressure treated? Yes or No

    On another sheet called Projectmaster I have the following in cell C9, which determines how many 8' long 2x4's are needed:

    =IF(AND(Tasks!B7="y",Tasks!B8=4,Tasks!B9>0,Tasks!B10<97),ROUNDUP(((Tasks!B9/96)*2)+(Tasks!B9/16)+1,0),0)

    In cell C10 I have this, which determines how many 10' long 2x4's are needed:

    =IF(AND(Tasks!B7="y",Tasks!B8=4,Tasks!B9>0,Tasks!B10>96,Tasks!B10<121),ROUNDUP(((Tasks!B9/96)*2)+(Tasks!B9/16)+1,0),0)

    Now these formulas work OK, but if the wall is longer than 96" I would rather use longer top and bottom plates, i.e. a 120" wall could use two 10' plates instead of two 8' and two 2' pieces. Same applies if the wall is longer than 10' I would want to use 12' plates.

    I tried adding an if statement in front of the "Tasks!B9/96)*2)" statement, but keep being told formula contains an error.

    Can anyone suggest how I can test the length of the wall inside this formula and choose the correct length based on Tasks!B9?

    As an example, a 8' high wall that is 10' long should have nine 2x4x8' and two 2x4x10'.

    Or would a lookup table be better to use?
    Last edited by rfcomm2k; 12-18-2014 at 12:23 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] F4 doesn't work only in excel, how to make it work again?
    By Dave H in forum Excel General
    Replies: 1
    Last Post: 02-26-2014, 11:22 AM
  2. [SOLVED] nested if formula that i cant sem to make work
    By fordtough68 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-19-2013, 11:44 AM
  3. [SOLVED] How to make the macro work for all rows in the work sheet
    By Valli nayaki in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-18-2013, 10:43 PM
  4. a work around for nested IF?
    By valkie in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-06-2012, 01:11 AM
  5. [SOLVED] Spin button in a work sheet - how do I make it work?
    By mike_l_moore@msn.com in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-07-2005, 04: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