conditional formula

J

jcheko

I am setting a spreadsheet about drainage pipe but need to insert a
condition. I need to add a distance: "that is 1/4 of the diameter of the pipe
or 4 inches minimum"...thanks for your help
 
B

Bernard Liengme

You gave us few details to work with but....
Let A1 have the diameter of the pipe
In B1 I have the formula =MAX(A1/4,4)
When A1 has value 12, B1 displays 4 (the specified minimum); but when A1 has
value 24 then B1 displays 6 (1/4 of 24)
Note that we specify a min but need to use the max function! We want the
larger of A1/4 and 4

I could have used a complicated IF as in =IF(A1/4 > 4, A1/4, 4) which says
if a quarter of A1 is greater than 4 then give me A1/4 else give me 4.
 
J

jcheko

thanks a lot....that was very helpful.

Bernard Liengme said:
You gave us few details to work with but....
Let A1 have the diameter of the pipe
In B1 I have the formula =MAX(A1/4,4)
When A1 has value 12, B1 displays 4 (the specified minimum); but when A1 has
value 24 then B1 displays 6 (1/4 of 24)
Note that we specify a min but need to use the max function! We want the
larger of A1/4 and 4

I could have used a complicated IF as in =IF(A1/4 > 4, A1/4, 4) which says
if a quarter of A1 is greater than 4 then give me A1/4 else give me 4.
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top