+ Reply to Thread
Results 1 to 7 of 7

help with formula

  1. #1
    Juco
    Guest

    help with formula

    I have in cell N19 the formula below. I am trying get it to put in cell N19
    the following
    if H8 =2 then N19 = £50, if H8 = 3 then N19=£75, if H8 = 1 then N19 =£0
    I have tried to amend a previous formula but with little success.

    =IF(H8="3",75,)

    help appreciated
    thanks



  2. #2
    Forum Contributor
    Join Date
    08-23-2004
    Posts
    210
    Put this table in an unused area: I used D2 to D4 for the 1, 2, 3. E2 to E4 for the 0, 50, 75 (it doesn't matter that the numbers are in General format).
    1 0
    2 50
    3 75

    In H8 put this vlookup formula:
    =VLOOKUP(H8,D2:E4,2)

    Format N19 as Currency £.

    In H8 type a number 1, 2, 3

    I typed 3 in Cell H8

    £75.00 will show in Cell N19

  3. #3
    Bob Phillips
    Guest

    Re: help with formula

    =CHOOSE(H8,0,50,75)

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Juco" <Me@nospam.fictional> wrote in message
    news:xulWd.237648$B8.183647@fe3.news.blueyonder.co.uk...
    > I have in cell N19 the formula below. I am trying get it to put in cell

    N19
    > the following
    > if H8 =2 then N19 = £50, if H8 = 3 then N19=£75, if H8 = 1 then N19 =£0
    > I have tried to amend a previous formula but with little success.
    >
    > =IF(H8="3",75,)
    >
    > help appreciated
    > thanks
    >
    >




  4. #4
    Sandy Mann
    Guest

    Re: help with formula

    Try:


    =(H8>1)*(H8*25)

    Regards

    Sandy
    --
    to e-mail direct replace @mailinator.com with @tiscali.co.uk


    "Juco" <Me@nospam.fictional> wrote in message
    news:xulWd.237648$B8.183647@fe3.news.blueyonder.co.uk...
    > I have in cell N19 the formula below. I am trying get it to put in cell

    N19
    > the following
    > if H8 =2 then N19 = £50, if H8 = 3 then N19=£75, if H8 = 1 then N19 =£0
    > I have tried to amend a previous formula but with little success.
    >
    > =IF(H8="3",75,)
    >
    > help appreciated
    > thanks
    >
    >




  5. #5
    joeu2004@hotmail.com
    Guest

    Re: help with formula

    Juco wrote:
    > I have in cell N19 the formula below.
    > I am trying get it to put in cell N19 the following
    > if H8 =3D2 then N19 =3D =A350, if H8 =3D 3 then N19=3D=A375, if H8 =3D 1=

    then
    N19 =3D=A30
    > I have tried to amend a previous formula but with little success.
    > =3DIF(H8=3D"3",75,)


    =3Dif(h8 =3D 2, 50, if(h8 =3D 3, 75, 0))

    Please note that 2 and 3 are not quoted. Quoting
    "2" and "3" are strings, not values.

    That formula returns 0 if h8 is anything other than
    2 or 3, not just when h8 =3D 1. If you want something
    else for the h8 <> 1 case, you can do:

    =3Dif(h8 =3D 2, 50, if(h8 =3D 3, 75, if(h8 =3D 1, 0, -1)))

    substituting whatever value you want for -1.

    (Note: -1 is probably a poor choice. But it depends
    on your application.)

    I think this shows you, in general, how to "amend"
    your original formula. However, some of the other
    responses show more elegant approaches, which may or
    may not work as well, depending on your requirements.


  6. #6
    Juco
    Guest

    Re: help with formula

    excellent, works a treat.

    thank you


    "Bob Phillips" <bob.phillips@notheretiscali.co.uk> wrote in message
    news:OwGpLnaIFHA.720@TK2MSFTNGP10.phx.gbl...
    > =CHOOSE(H8,0,50,75)
    >
    > --
    >
    > HTH
    >
    > RP
    > (remove nothere from the email address if mailing direct)
    >
    >
    > "Juco" <Me@nospam.fictional> wrote in message
    > news:xulWd.237648$B8.183647@fe3.news.blueyonder.co.uk...
    > > I have in cell N19 the formula below. I am trying get it to put in cell

    > N19
    > > the following
    > > if H8 =2 then N19 = £50, if H8 = 3 then N19=£75, if H8 = 1 then N19 =£0
    > > I have tried to amend a previous formula but with little success.
    > >
    > > =IF(H8="3",75,)
    > >
    > > help appreciated
    > > thanks
    > >
    > >

    >
    >




  7. #7
    Gord Dibben
    Guest

    Re: help with formula

    Juco

    If those are the only choices use this in N19

    =CHOOSE(H8,0,50,75,"invalid number")

    1 = 0
    2 = 50
    3 = 75


    Gord Dibben Excel MVP


    On Sat, 05 Mar 2005 16:53:49 GMT, "Juco" <Me@nospam.fictional> wrote:

    >I have in cell N19 the formula below. I am trying get it to put in cell N19
    >the following
    >if H8 =2 then N19 = £50, if H8 = 3 then N19=£75, if H8 = 1 then N19 =£0
    >I have tried to amend a previous formula but with little success.
    >
    >=IF(H8="3",75,)
    >
    >help appreciated
    >thanks
    >



+ 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