+ Reply to Thread
Results 1 to 6 of 6

Thread: IF maximums

  1. #1
    B G
    Guest

    IF maximums

    this is reposted.

    I am not having much luck with that - I'm wondering if it would be easier to
    do something like this

    4 of the Cells in column B are = to $34, could I do a formula that basically
    says:

    If cell C11=BR or FW or NE or HI, then multiply cell B3*C13*C9.

    This would elimiate the need for more than 7 IF statements, as 4 of the 10
    would be included in the statement above.

    I'm getting there, slowly - thanks for your help.
    --



    "Excelenator" wrote:

    >
    > You can actually nest many more than 7 if statements if you use named
    > formulas. The first thing you have to do is take your current formula
    > and copy it from the formula bar. Go to Insert\Name\Define and type in
    > a formula name (I used IFOne) and then paste in your formula in the
    > Refers to: box replacing the cell reference and then click OK. Once
    > that is done, create the formula for all the other IF scenarios that
    > you have and name them in succession (i.e. IFTwo, IFThree etc.) like
    > you did above. Then in the cell you want the formulas to appear enter
    > the following IF statement:
    >
    > IF(IFOne,IFOne,IF(IFTwo,IFTwo,IF(IFThree,IFThree,0)))
    >
    > The example above will allow you to nest 21 if statements!
    >
    >
    > --
    > Excelenator
    >
    >
    > ------------------------------------------------------------------------
    > Excelenator's Profile: http://www.excelforum.com/member.php...o&userid=36768
    > View this thread: http://www.excelforum.com/showthread...hreadid=565179
    >


    --
    Barb

  2. #2
    Valued Forum Contributor Excelenator's Avatar
    Join Date
    07-25-2006
    Location
    Wantagh, NY
    Posts
    333
    Use this formula

    IF(OR(C11="BR",C11="FW,C11="NE,C11="HI"),B3*C13*C9, [condition if false here most likely the other if statements])
    Quote Originally Posted by B G
    this is reposted.

    I am not having much luck with that - I'm wondering if it would be easier to
    do something like this

    4 of the Cells in column B are = to $34, could I do a formula that basically
    says:

    If cell C11=BR or FW or NE or HI, then multiply cell B3*C13*C9.

    This would elimiate the need for more than 7 IF statements, as 4 of the 10
    would be included in the statement above.

    I'm getting there, slowly - thanks for your help.
    --



    "Excelenator" wrote:

    >
    > You can actually nest many more than 7 if statements if you use named
    > formulas. The first thing you have to do is take your current formula
    > and copy it from the formula bar. Go to Insert\Name\Define and type in
    > a formula name (I used IFOne) and then paste in your formula in the
    > Refers to: box replacing the cell reference and then click OK. Once
    > that is done, create the formula for all the other IF scenarios that
    > you have and name them in succession (i.e. IFTwo, IFThree etc.) like
    > you did above. Then in the cell you want the formulas to appear enter
    > the following IF statement:
    >
    > IF(IFOne,IFOne,IF(IFTwo,IFTwo,IF(IFThree,IFThree,0)))
    >
    > The example above will allow you to nest 21 if statements!
    >
    >
    > --
    > Excelenator
    >
    >
    > ------------------------------------------------------------------------
    > Excelenator's Profile: http://www.excelforum.com/member.php...o&userid=36768
    > View this thread: http://www.excelforum.com/showthread...hreadid=565179
    >


    --
    Barb
    ---------------------------------------------------
    ONLY APPLIES TO VBA RESPONSES WHERE APPROPRIATE
    To insert code into the VBE (Visual Basic Editor)
    1. Copy the code.
    2. Open workbook to paste code into.
    3. Right click any worksheet tab, select View Code
    4. VBE (Visual Basic Editor) opens to that sheets object
    5. You may change to another sheets object or the This Workbook object by double clicking it in the Project window
    6. In the blank space below the word "General" paste the copied code.

  3. #3
    Toppers
    Guest

    RE: IF maximums

    =IF(OR(C11="BR",C11="FW",C11="NE",C11="HI"),B3*C13*C9,??)

    ?? .... whatever False contion is

    HTH

    "B G" wrote:

    > this is reposted.
    >
    > I am not having much luck with that - I'm wondering if it would be easier to
    > do something like this
    >
    > 4 of the Cells in column B are = to $34, could I do a formula that basically
    > says:
    >
    > If cell C11=BR or FW or NE or HI, then multiply cell B3*C13*C9.
    >
    > This would elimiate the need for more than 7 IF statements, as 4 of the 10
    > would be included in the statement above.
    >
    > I'm getting there, slowly - thanks for your help.
    > --
    >
    >
    >
    > "Excelenator" wrote:
    >
    > >
    > > You can actually nest many more than 7 if statements if you use named
    > > formulas. The first thing you have to do is take your current formula
    > > and copy it from the formula bar. Go to Insert\Name\Define and type in
    > > a formula name (I used IFOne) and then paste in your formula in the
    > > Refers to: box replacing the cell reference and then click OK. Once
    > > that is done, create the formula for all the other IF scenarios that
    > > you have and name them in succession (i.e. IFTwo, IFThree etc.) like
    > > you did above. Then in the cell you want the formulas to appear enter
    > > the following IF statement:
    > >
    > > IF(IFOne,IFOne,IF(IFTwo,IFTwo,IF(IFThree,IFThree,0)))
    > >
    > > The example above will allow you to nest 21 if statements!
    > >
    > >
    > > --
    > > Excelenator
    > >
    > >
    > > ------------------------------------------------------------------------
    > > Excelenator's Profile: http://www.excelforum.com/member.php...o&userid=36768
    > > View this thread: http://www.excelforum.com/showthread...hreadid=565179
    > >

    >
    > --
    > Barb


  4. #4
    B G
    Guest

    Re: IF maximums

    OK - so if I put in just the formula you wrote - that works, but now what if
    I want to include the other cell value possibilities; i.e., BL=30.50;
    EP=32.50; ER=38.75 ; these amounts will vary which is why I had the amounts
    in before as a cell (BL=B3 which equalled 30.50.

    =IF(OR(C11="BR",C11="FW",C11="HI",C11="NE"),34*C13*C9),IF(C11="BL",B3*C13*C9,IF(C11="EP",B5*C13*C9))

    This is what I put in - but it brings back #VALUE!
    --
    Barb


    "Excelenator" wrote:

    >
    > Use this formula
    >
    >
    > Code:
    > --------------------
    > IF(OR(C11="BR",C11="FW,C11="NE,C11="HI"),B3*C13*C9, [condition if false here most likely the other if statements])
    > --------------------
    >
    >
    > B G Wrote:
    > > this is reposted.
    > >
    > > I am not having much luck with that - I'm wondering if it would be
    > > easier to
    > > do something like this
    > >
    > > 4 of the Cells in column B are = to $34, could I do a formula that
    > > basically
    > > says:
    > >
    > > If cell C11=BR or FW or NE or HI, then multiply cell B3*C13*C9.
    > >
    > > This would elimiate the need for more than 7 IF statements, as 4 of the
    > > 10
    > > would be included in the statement above.
    > >
    > > I'm getting there, slowly - thanks for your help.
    > > --
    > >
    > >
    > >
    > > "Excelenator" wrote:
    > >
    > > >
    > > > You can actually nest many more than 7 if statements if you use

    > > named
    > > > formulas. The first thing you have to do is take your current

    > > formula
    > > > and copy it from the formula bar. Go to Insert\Name\Define and type

    > > in
    > > > a formula name (I used IFOne) and then paste in your formula in the
    > > > Refers to: box replacing the cell reference and then click OK. Once
    > > > that is done, create the formula for all the other IF scenarios that
    > > > you have and name them in succession (i.e. IFTwo, IFThree etc.)

    > > like
    > > > you did above. Then in the cell you want the formulas to appear

    > > enter
    > > > the following IF statement:
    > > >
    > > > IF(IFOne,IFOne,IF(IFTwo,IFTwo,IF(IFThree,IFThree,0)))
    > > >
    > > > The example above will allow you to nest 21 if statements!
    > > >
    > > >
    > > > --
    > > > Excelenator
    > > >
    > > >
    > > >

    > > ------------------------------------------------------------------------
    > > > Excelenator's Profile:

    > > http://www.excelforum.com/member.php...o&userid=36768
    > > > View this thread:

    > > http://www.excelforum.com/showthread...hreadid=565179
    > > >

    > >
    > > --
    > > Barb

    >
    >
    > --
    > Excelenator
    >
    >
    > ------------------------------------------------------------------------
    > Excelenator's Profile: http://www.excelforum.com/member.php...o&userid=36768
    > View this thread: http://www.excelforum.com/showthread...hreadid=565270
    >
    >


  5. #5
    Valued Forum Contributor Excelenator's Avatar
    Join Date
    07-25-2006
    Location
    Wantagh, NY
    Posts
    333
    The problem is the ")" after C9 in your formula. It should be removed and an additional ")" should be placed at the end of the formula.

    =IF(OR(C11="BR",C11="FW",C11="HI",C11="NE"),34*C13*C9),IF(C11="BL",B3*C13*C9,IF(C11="EP",B5*C13*C9))
    ---------------------------------------------------
    ONLY APPLIES TO VBA RESPONSES WHERE APPROPRIATE
    To insert code into the VBE (Visual Basic Editor)
    1. Copy the code.
    2. Open workbook to paste code into.
    3. Right click any worksheet tab, select View Code
    4. VBE (Visual Basic Editor) opens to that sheets object
    5. You may change to another sheets object or the This Workbook object by double clicking it in the Project window
    6. In the blank space below the word "General" paste the copied code.

  6. #6
    B G
    Guest

    Re: IF maximums

    Awesome - thank you so much.
    --
    Barb


    "Excelenator" wrote:

    >
    > The problem is the ")" after C9 in your formula. It should be removed
    > and an additional ")" should be placed at the end of the formula.
    >
    > =IF(OR(C11="BR",C11="FW",C11="HI",C11="NE"),34*C13*C9*)*,IF(C11="BL",B3*C13*C9,IF(C11="EP",B5*C13*C9 ))
    >
    >
    > --
    > Excelenator
    >
    >
    > ------------------------------------------------------------------------
    > Excelenator's Profile: http://www.excelforum.com/member.php...o&userid=36768
    > View this thread: http://www.excelforum.com/showthread...hreadid=565270
    >
    >


+ Reply to Thread

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