IF statements ???

wrenlea

New Member
Joined
Nov 27, 2002
Messages
17
Hi
I need to get a cell to return a value depending on a number of things which i am trying ot use "if" for
The cell in question is C104 and so far I have the following:
=IF(E99="1",F73*D99,F73*D99/2)
Clearly this will be clear to you all.
HOWEVER I need this cell to return this value ONLY if cell F99 has a Y in it and if not C104 must be zero.
I hope this makes sense and hope even more that someone can help me please.
I think i need a further nested if ?? but have yet to fathom this

(Ideally the value for C104 should only be divided by 2 when the value of D99 is 2 or more ?? )

Thanks

Peter
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Howdy wrenlea,

=IF(AND(F99="Y",E99="1"),IF(D99>=2,F73*D99/2,F73*D99),0)

This ought to work (fingers crossed :LOL: )
 
Upvote 0
you could use either of the following; I asumed test for number 1 and not text.

=IF(F99="Y",IF(E99=1,F73*D99,F73*D99/2),0)

or

=(F99="Y")*((E99=1)*0.5+0.5)*(F73*D99)

N.B. I did not notice the "(Ideally the value for C104 should only be divided by 2 when the value of D99 is 2 or more ?? ) "
 
Upvote 0
:D Yup Dave you're right of course it -should- be the number 1 .... I used the Text 1 since wrenlea used the Text.

=(F99="Y")*((E99=1)*0.5+0.5)*(F73*D99)

Can you explain this one for me? I understand the splats but what is the 0.5+0.5 how is that working?

I love this board I learn something new everyday.

And Aladin if you have the time can you explain your use of MAX in your formula?

TIA
 
Upvote 0
=(F99="Y")*((E99=1)*0.5+0.5)*(F73*D99)

Can you explain this one for me? I understand the splats but what is the 0.5+0.5 how is that working?

----------------------

I guess I didn't read the full question. You can adapt one of the approaches to consider the D99 >2


With Excel functions, a True is equivalent to 1 and False= 0.

(F99="Y) if True multiple the rest by 1; if False multiple by 0 (result 0)


(F73*D99) is * 1/2 but if E99=1 it is * 1/2+1/2 (1)
 
Upvote 0
[quote="Dave Patton

(F99="Y) if True multiple the rest by 1; if False multiple by 0 (result 0)


(F73*D99) is * 1/2 but if E99=1 it is * 1/2+1/2 (1)[/quote]

:oops: Wow talk about a blonde moment! * .5 = /2 I dunno why that didn't click when I read it the first time.... too much partying in my youth is my excuse :cool:

Thanks
 
Upvote 0

Forum statistics

Threads
1,221,691
Messages
6,161,322
Members
451,696
Latest member
Senthil Murugan

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top