View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
Luke M Luke M is offline
external usenet poster
 
Posts: 2,722
Default if statement in formula

Ok, thanks for response. You basic formula structure is okay then, just need
to swap the A3 reference out to:

=A2*IF(B2="1/4 points",A2/4,IF(B2="1/8 points",A2/8))*C2
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Derrick" wrote:

luke, thanks for the input - actually, these are text values are from a
validated list, so there's not going to be any variance.. so it will be
easier in the long run... i wont have to look for '1/2.455 points' or
anything like that

"Luke M" wrote:

While that is a valid formula, if you're dealing with multiple text values
which already contain the number you want, why not do this:

=C2*A2*A2/MID(B2,FIND("/",B2)+1,FIND(" ",B2)-FIND("/",B2)-1)

I'm assuming you wanted to multiply by height (C2) and not A3. Note that you
could now copy this down, and you don't have to worry about all the different
fractions you might have.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Derrick" wrote:

is it possible to do this:

D2 = A2 * if(B1= "1/4 points", A2/4, if(B2="1/8 points", A2/8)) * A3

a b c d
1 LENGTH POSITION HEIGHT ANSWER
2 12 "1/4 points" 24 864
3 12 "1/8 points" 24 432

with my if statement... to avoid writing my formula 3 times... this is a
hugely simplified formula - the actual one is several lines long, and i'd
like to minimize code.
thanks,