Excel User Group
Microsoft Excel blogs, forums, files. Read, ask questions, provide answers.

if statement with ranges

Latest post Mon, Aug 30 2010 6:04 AM by Bob Phillips. 5 replies.
  • Mon, Aug 23 2010 11:32 AM

    • TGM
    • Top 500 Contributor
    • Joined on Mon, Aug 23 2010
    • Posts 3
    • Points 47

    if statement with ranges

    This is my question/issue – I am trying to create an estimating tool for software projects.  Based on 3 or more project types (A, B, C) the three major roles (business analyst, developer and quality assurance) have different level of efforts (time they will spend on the project).

     

    I created the following formula to calculate/estimate each effort based on project type (A, B, C) estimates =IF($D7="A",'Project Types'!$B$4*$T7,IF($D7="B",'Project Types'!$B$9*$T7,IF($D7="C",'Project Types'!$B$14*$T7,"TBD"))), for this example let say this formula returns “20” in the cell.

     

    What I would like to do is calculate a range, say plus or minus 30%, thereby giving me “14 – 26” in the cell. 

     

    I know I could probably add various cells and do a bunch of calculations and then concatenate the results – but what I would like to do is handle this through 1 formula.  Any suggestions?

    Filed under: ,
    • Post Points: 21
  • Mon, Aug 23 2010 12:29 PM In reply to

    • Jim Cone
    • Top 10 Contributor
    • Joined on Tue, Jan 15 2008
    • Portland, Oregon - USA
    • Posts 233
    • Points 3,315

    Re: if statement with ranges

    Enter your posted formula in A1 and change "TBD" to 0. (zero)
    Use the following formula to get the desired result...

    =IF(A1>0,0.7*A1 & " - " & 1.3*A1,"TBD")
    '--
    Jim Cone
    Portland Oregon USA
    http://www.mediafire.com/PrimitiveSoftware

    • Post Points: 36
  • Mon, Aug 23 2010 1:53 PM In reply to

    • TGM
    • Top 500 Contributor
    • Joined on Mon, Aug 23 2010
    • Posts 3
    • Points 47

    Re: if statement with ranges

    that works GREAT - thanks for you help

    • Post Points: 5
  • Mon, Aug 23 2010 1:57 PM In reply to

    • TGM
    • Top 500 Contributor
    • Joined on Mon, Aug 23 2010
    • Posts 3
    • Points 47

    Re: if statement with ranges

    One more question, how do i "code" this so it only shows whole numbers 26 not 26.7?

    • Post Points: 21
  • Sat, Aug 28 2010 4:21 PM In reply to

    • Jim Cone
    • Top 10 Contributor
    • Joined on Tue, Jan 15 2008
    • Portland, Oregon - USA
    • Posts 233
    • Points 3,315

    Re: if statement with ranges

    Your post did not appear until today(Aug 28, 2010)...

    Try:  =IF(A1>0,TRUNC(0.7*A1) & " - " & TRUNC(1.3*A1),"TBD")

    You can also use Int or Round instead of Trunc.  See Excel help.
    '--
    Jim Cone
    Portland, Oregon USA
    Special Sort add-in (review of)

    • Post Points: 21
  • Mon, Aug 30 2010 6:04 AM In reply to

    Re: if statement with ranges

    Jim Cone:

    Your post did not appear until today(Aug 28, 2010)...

    It was awaiting moderation Jim, and I didn't spot it until late.

    Regards

    Bob

    • Post Points: 5
Page 1 of 1 (6 items) | RSS
Copyright Excel User Group and the relevant contributors, 2010. All Trade Marks acknowledged. This site is a peer-to-peer site and NOT affiliated in any way to Microsoft Corp. All rights reserved.