+ Reply to Thread
Results 1 to 5 of 5

If formula- I need a formula that has many functions

  1. #1
    John
    Guest

    If formula- I need a formula that has many functions

    I need a formula that has many functions. The formula will be in cell g2. I
    want to check cell e2, and if it =0 then cell g2 should show a 0. If e2 is
    less than 50,000 then the number in a1 should show in g2. If the number in e2
    is greater than 50,000 then I need a formula that takes the number in e2
    subtracts the number in d1, then divides that number by 1,000. Then that
    number is multiplied the number in c1 and then add to this number the number
    in a1. Basically the number in a1 is 166.35 and does not change. The number
    in c1 is 2.81 and does not change. The number in d1 is 50,000 and does not
    change. The number in e2 is the only one that changes and this is the usage
    number. The customer receives the 50,000 gallons for 166.35 and for every
    1,000 gallons over 50,000 they must pay 2.81. However if the number in e2 is
    blank or 0 then I need the number in g2 to be 0.
    If this is too confusing please let me know and I will try to simplify it.
    Thanks for any help.

    --
    John

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482
    well yeh,
    simplify it,
    this looks like something that has to be done in VBA

  3. #3
    andy62
    Guest

    re: If formula- I need a formula that has many functions

    try pasting this in cell G2:

    =IF(E2=0,0,IF(E2<50000,$A$1,$A$1+$C$1*(E2-$D$1)/1000))

    The $ characters will preserve the references to the fixed cells (A1, C1,
    and D1) if you copy the formula down to other rows below G2.

    Hope that helps.

    "John" wrote:

    > I need a formula that has many functions. The formula will be in cell g2. I
    > want to check cell e2, and if it =0 then cell g2 should show a 0. If e2 is
    > less than 50,000 then the number in a1 should show in g2. If the number in e2
    > is greater than 50,000 then I need a formula that takes the number in e2
    > subtracts the number in d1, then divides that number by 1,000. Then that
    > number is multiplied the number in c1 and then add to this number the number
    > in a1. Basically the number in a1 is 166.35 and does not change. The number
    > in c1 is 2.81 and does not change. The number in d1 is 50,000 and does not
    > change. The number in e2 is the only one that changes and this is the usage
    > number. The customer receives the 50,000 gallons for 166.35 and for every
    > 1,000 gallons over 50,000 they must pay 2.81. However if the number in e2 is
    > blank or 0 then I need the number in g2 to be 0.
    > If this is too confusing please let me know and I will try to simplify it.
    > Thanks for any help.
    >
    > --
    > John


  4. #4
    andy62
    Guest

    re: If formula- I need a formula that has many functions

    try pasting this in cell G2:

    =IF(E2=0,0,IF(E2<50000,$A$1,$A$1+$C$1*(E2-$D$1)/1000))

    The $ characters will preserve the references to the fixed cells (A1, C1,
    and D1) if you copy the formula down to other rows below G2.

    Hope that helps.


    "John" wrote:

    > I need a formula that has many functions. The formula will be in cell g2. I
    > want to check cell e2, and if it =0 then cell g2 should show a 0. If e2 is
    > less than 50,000 then the number in a1 should show in g2. If the number in e2
    > is greater than 50,000 then I need a formula that takes the number in e2
    > subtracts the number in d1, then divides that number by 1,000. Then that
    > number is multiplied the number in c1 and then add to this number the number
    > in a1. Basically the number in a1 is 166.35 and does not change. The number
    > in c1 is 2.81 and does not change. The number in d1 is 50,000 and does not
    > change. The number in e2 is the only one that changes and this is the usage
    > number. The customer receives the 50,000 gallons for 166.35 and for every
    > 1,000 gallons over 50,000 they must pay 2.81. However if the number in e2 is
    > blank or 0 then I need the number in g2 to be 0.
    > If this is too confusing please let me know and I will try to simplify it.
    > Thanks for any help.
    >
    > --
    > John


  5. #5
    John
    Guest

    re: If formula- I need a formula that has many functions

    The formula worked perfectly! Thanks for your help.

    --
    John


    "andy62" wrote:

    > try pasting this in cell G2:
    >
    > =IF(E2=0,0,IF(E2<50000,$A$1,$A$1+$C$1*(E2-$D$1)/1000))
    >
    > The $ characters will preserve the references to the fixed cells (A1, C1,
    > and D1) if you copy the formula down to other rows below G2.
    >
    > Hope that helps.
    >
    > "John" wrote:
    >
    > > I need a formula that has many functions. The formula will be in cell g2. I
    > > want to check cell e2, and if it =0 then cell g2 should show a 0. If e2 is
    > > less than 50,000 then the number in a1 should show in g2. If the number in e2
    > > is greater than 50,000 then I need a formula that takes the number in e2
    > > subtracts the number in d1, then divides that number by 1,000. Then that
    > > number is multiplied the number in c1 and then add to this number the number
    > > in a1. Basically the number in a1 is 166.35 and does not change. The number
    > > in c1 is 2.81 and does not change. The number in d1 is 50,000 and does not
    > > change. The number in e2 is the only one that changes and this is the usage
    > > number. The customer receives the 50,000 gallons for 166.35 and for every
    > > 1,000 gallons over 50,000 they must pay 2.81. However if the number in e2 is
    > > blank or 0 then I need the number in g2 to be 0.
    > > If this is too confusing please let me know and I will try to simplify it.
    > > Thanks for any help.
    > >
    > > --
    > > John


+ 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.6.0 RC 1