ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   help with formula (https://www.excelbanter.com/excel-worksheet-functions/16255-help-formula.html)

Juco

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



Bob Phillips

=CHOOSE(H8,0,50,75)

--

HTH

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


"Juco" wrote in message
.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





Sandy Mann

Try:


=(H81)*(H8*25)

Regards

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


"Juco" wrote in message
.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





[email protected]

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.


Juco

excellent, works a treat.

thank you


"Bob Phillips" wrote in message
...
=CHOOSE(H8,0,50,75)

--

HTH

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


"Juco" wrote in message
.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







Gord Dibben

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" 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




All times are GMT +1. The time now is 10:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com