![]() |
How to determine the value?
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 |
How to determine the value?
Eric,
Possibly this in B1 =IF(MOD(INT(SQRT(A1)),2)=0,INT(SQRT(A1)-1),INT(SQRT(A1))) Mike "Eric" wrote: 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 |
How to determine the value?
=INT(SQRT(A1))-ISEVEN(SQRT(A1))
-- David Biddulph "Eric" wrote in message ... 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 |
How to determine the value?
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 Replace @mailinator.com with @tiscali.co.uk "David Biddulph" <groups [at] biddulph.org.uk wrote in message ... =INT(SQRT(A1))-ISEVEN(SQRT(A1)) -- David Biddulph "Eric" wrote in message ... 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 |
How to determine the value?
Yes, if non-integer it will truncate.
-- David Biddulph "Sandy Mann" wrote in message ... It just dawned on me - I assume that ISEVEN() works on the integer part os a number only? "Sandy Mann" wrote in message ... 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 "Eric" wrote in message ... 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 |
How to determine the value?
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 Replace @mailinator.com with @tiscali.co.uk "David Biddulph" <groups [at] biddulph.org.uk wrote in message ... Yes, if non-integer it will truncate. -- David Biddulph "Sandy Mann" wrote in message ... It just dawned on me - I assume that ISEVEN() works on the integer part os a number only? "Sandy Mann" wrote in message ... 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 "Eric" wrote in message ... 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 |
How to determine the value?
On Dec 27, 2:37*am, Eric wrote:
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. |
How to determine the value?
Clarification....
On Dec 27, 9:10*am, I wrote: 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. |
All times are GMT +1. The time now is 03:23 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com