How to determine the value?

E

Eric

There is a given value 68 in cell A1, I would like to determine the value
based on following conditions.
Sqrt(68) = 8.24621, and the rounddown to the closest odd number, which is 7,
and return this value in cell B1.
Does anyone have any suggestions?
Thanks in advance for any suggestions
Eric
 
M

Mike H

Eric,

Possibly this in B1

=IF(MOD(INT(SQRT(A1)),2)=0,INT(SQRT(A1)-1),INT(SQRT(A1)))

Mike
 
S

Sandy Mann

David,

Wouldn't that have to be:

=INT(SQRT(A1))-(ISEVEN(INT(SQRT(A1))))

(not that I have the ISEVEN() function to check it)

--
Regards,

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 
S

Sandy Mann

It just dawned on me - I assume that ISEVEN() works on the integer part os a
number only?

--
Regards,

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 
S

Sandy Mann

Thank you for the info David. Santa didn't bring me an updated version of
XL this year - perhaps next year....

--
Regards,

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk


David Biddulph said:
Yes, if non-integer it will truncate.
--
David Biddulph

Sandy Mann said:
It just dawned on me - I assume that ISEVEN() works on the integer part
os a number only?
Sandy Mann said:
David,

Wouldn't that have to be:

=INT(SQRT(A1))-(ISEVEN(INT(SQRT(A1))))

(not that I have the ISEVEN() function to check it)
"David Biddulph" <groups [at] biddulph.org.uk> wrote in message
=INT(SQRT(A1))-ISEVEN(SQRT(A1))
--
David Biddulph

There is a given value 68 in cell A1, I would like to determine the
value
based on following conditions.
Sqrt(68) = 8.24621, and the rounddown to the closest odd number, which
is 7,
and return this value in cell B1.
Does anyone have any suggestions?
Thanks in advance for any suggestions
Eric
 
J

joeu2004

There is a given value 68 in cell A1, I would like to determine
the value based on following conditions.
Sqrt(68) = 8.24621, and the rounddown to the closest odd
number, which is 7, and return this value in cell B1.
Does anyone have any suggestions?

=2*int((sqrt(A1)-1)/2) + 1

2*INT((x-1)/2) is the next lower even number of x. Adding 1 is the
next lower odd number.
 
J

joeu2004

Clarification....

2*INT((x-1)/2) is the next lower even number of x.  Adding 1 is the
next lower odd number.

Referring to the integer part, if x is not an integer.
 

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