+ Reply to Thread
Results 1 to 11 of 11

[SOLVED] brainteaser: change a value by 90 (but answer must lie between 0-180 )

  1. #1
    Chris.Holland16@gmail.com
    Guest

    [SOLVED] brainteaser: change a value by 90 (but answer must lie between 0-180 )


    Please see below ( I want to do step 3 - change a value by 90 degrees)
    but the answer has to be between 0 and 180

    e=2Eg. 45 becomes 90

    e=2Eg. 95 becomes 185 (but this is wrong, so SUBTRACT 90 instead) anwer
    is 5



    ***************************************************************************=
    *********
    from http://www.usaeyes.org/faq/subjects/script.htm

    Minus Cylinder or Plus Cylinder

    Spectacle prescriptions can be written in two value sets, minus
    cylinder or plus cylinder, which are mutually exclusive of each other
    but provide the same information. As a rule, ophthalmologists write
    scripts in minus cylinder whereas optometrists write scripts in plus
    cylinder. Why these two professions cannot get together and decide on a
    common method of reporting refractive error is impossible to explain,
    but if you have ever had competing siblings in your family, you may get
    an idea why this has not yet occurred.

    To convert a minus cylinder form prescription into plus cylinder, or to
    convert the plus cylinder form into minus cylinder, do the following:

    1) Add the sphere and cylinder powers together; this becomes the new
    sphere power.
    2) Change the sign of the cylinder power, from minus (-) to plus (+)
    or from plus (+) to minus (-).
    3) Change the axis value by 90=B0, remembering that the axis must be a
    number from 1 to 180.
    The following lens prescriptions, therefore, are equivalent and
    interchangeable

    ***************************************************************************=
    *********


  2. #2
    Stephan Bielicke
    Guest

    Re: brainteaser: change a value by 90 (but answer must lie between 0-180 )

    Hello,

    <Chris.Holland16@gmail.com> schrieb
    >Please see below ( I want to do step 3 - change a value by 90 degrees)
    >but the answer has to be between 0 and 180
    >
    >e.g. 45 becomes 90


    ? 135 ?

    >e.g. 95 becomes 185 (but this is wrong, so SUBTRACT 90 instead) anwer is 5


    try
    =MOD(A1+90;180)
    if a1 contains the original value.

    HTH
    Stefan



  3. #3
    Ron Rosenfeld
    Guest

    Re: brainteaser: change a value by 90 (but answer must lie between 0-180 )

    On 15 Nov 2005 11:11:04 -0800, Chris.Holland16@gmail.com wrote:

    >
    >Please see below ( I want to do step 3 - change a value by 90 degrees)
    >but the answer has to be between 0 and 180
    >
    >e.g. 45 becomes 90
    >
    >e.g. 95 becomes 185 (but this is wrong, so SUBTRACT 90 instead) anwer
    >is 5
    >



    =MOD(A1+90,180)+(MOD(A1+90,180)=0)*180




    >
    >
    >************************************************************************************
    >from http://www.usaeyes.org/faq/subjects/script.htm
    >
    > Minus Cylinder or Plus Cylinder
    >
    >Spectacle prescriptions can be written in two value sets, minus
    >cylinder or plus cylinder, which are mutually exclusive of each other
    >but provide the same information. As a rule, ophthalmologists write
    >scripts in minus cylinder whereas optometrists write scripts in plus
    >cylinder. Why these two professions cannot get together and decide on a
    >common method of reporting refractive error is impossible to explain,
    >but if you have ever had competing siblings in your family, you may get
    >an idea why this has not yet occurred.
    >
    >To convert a minus cylinder form prescription into plus cylinder, or to
    >convert the plus cylinder form into minus cylinder, do the following:
    >
    >1) Add the sphere and cylinder powers together; this becomes the new
    >sphere power.
    >2) Change the sign of the cylinder power, from minus (-) to plus (+)
    >or from plus (+) to minus (-).
    >3) Change the axis value by 90°, remembering that the axis must be a
    >number from 1 to 180.
    >The following lens prescriptions, therefore, are equivalent and
    >interchangeable
    >
    >************************************************************************************


    --ron

  4. #4
    bpeltzer
    Guest

    RE: brainteaser: change a value by 90 (but answer must lie between 0-1

    =mod(a1+90,180) will constrain the sum of a1 and 90 to the range of 0-180.

    "Chris.Holland16@gmail.com" wrote:

    >
    > Please see below ( I want to do step 3 - change a value by 90 degrees)
    > but the answer has to be between 0 and 180
    >
    > e.g. 45 becomes 90
    >
    > e.g. 95 becomes 185 (but this is wrong, so SUBTRACT 90 instead) anwer
    > is 5
    >
    >
    >
    > ************************************************************************************
    > from http://www.usaeyes.org/faq/subjects/script.htm
    >
    > Minus Cylinder or Plus Cylinder
    >
    > Spectacle prescriptions can be written in two value sets, minus
    > cylinder or plus cylinder, which are mutually exclusive of each other
    > but provide the same information. As a rule, ophthalmologists write
    > scripts in minus cylinder whereas optometrists write scripts in plus
    > cylinder. Why these two professions cannot get together and decide on a
    > common method of reporting refractive error is impossible to explain,
    > but if you have ever had competing siblings in your family, you may get
    > an idea why this has not yet occurred.
    >
    > To convert a minus cylinder form prescription into plus cylinder, or to
    > convert the plus cylinder form into minus cylinder, do the following:
    >
    > 1) Add the sphere and cylinder powers together; this becomes the new
    > sphere power.
    > 2) Change the sign of the cylinder power, from minus (-) to plus (+)
    > or from plus (+) to minus (-).
    > 3) Change the axis value by 90°, remembering that the axis must be a
    > number from 1 to 180.
    > The following lens prescriptions, therefore, are equivalent and
    > interchangeable
    >
    > ************************************************************************************
    >
    >


  5. #5
    Ron Rosenfeld
    Guest

    Re: brainteaser: change a value by 90 (but answer must lie between 0-1

    On Tue, 15 Nov 2005 11:31:06 -0800, "bpeltzer"
    <bpeltzer.deletethissuffix@cox.net> wrote:

    >=mod(a1+90,180) will constrain the sum of a1 and 90 to the range of 0-180.


    Actually it will constrain it to the range of 0-179.




    >
    >"Chris.Holland16@gmail.com" wrote:
    >
    >>
    >> Please see below ( I want to do step 3 - change a value by 90 degrees)
    >> but the answer has to be between 0 and 180
    >>
    >> e.g. 45 becomes 90
    >>
    >> e.g. 95 becomes 185 (but this is wrong, so SUBTRACT 90 instead) anwer
    >> is 5
    >>
    >>
    >>
    >> ************************************************************************************
    >> from http://www.usaeyes.org/faq/subjects/script.htm
    >>
    >> Minus Cylinder or Plus Cylinder
    >>
    >> Spectacle prescriptions can be written in two value sets, minus
    >> cylinder or plus cylinder, which are mutually exclusive of each other
    >> but provide the same information. As a rule, ophthalmologists write
    >> scripts in minus cylinder whereas optometrists write scripts in plus
    >> cylinder. Why these two professions cannot get together and decide on a
    >> common method of reporting refractive error is impossible to explain,
    >> but if you have ever had competing siblings in your family, you may get
    >> an idea why this has not yet occurred.
    >>
    >> To convert a minus cylinder form prescription into plus cylinder, or to
    >> convert the plus cylinder form into minus cylinder, do the following:
    >>
    >> 1) Add the sphere and cylinder powers together; this becomes the new
    >> sphere power.
    >> 2) Change the sign of the cylinder power, from minus (-) to plus (+)
    >> or from plus (+) to minus (-).
    >> 3) Change the axis value by 90°, remembering that the axis must be a
    >> number from 1 to 180.
    >> The following lens prescriptions, therefore, are equivalent and
    >> interchangeable
    >>
    >> ************************************************************************************
    >>
    >>


    --ron

  6. #6
    Chris.Holland16@gmail.com
    Guest

    Re: brainteaser: change a value by 90 (but answer must lie between 0-1


    bpeltzer wrote:

    > =mod(a1+90,180) will constrain the sum of a1 and 90 to the range of 0-180.
    >



    Thanks you - that's excellent.

    but how do i contrain sum from 1 to 180 (not 0 to 180)

    (so 90 degrees becomes 180 instead of 0)


  7. #7
    Chris.Holland16@gmail.com
    Guest

    Re: brainteaser: change a value by 90 (but answer must lie between 0-180 )


    Stephan Bielicke wrote:

    > Hello,
    >
    > <Chris.Holland16@gmail.com> schrieb
    > >Please see below ( I want to do step 3 - change a value by 90 degrees)
    > >but the answer has to be between 0 and 180
    > >
    > >e.g. 45 becomes 90

    >
    > ? 135 ?
    >
    > >e.g. 95 becomes 185 (but this is wrong, so SUBTRACT 90 instead) anwer is 5

    >
    > try
    > =MOD(A1+90;180)
    > if a1 contains the original value.
    >
    > HTH
    > Stefan



    thanks for correcting my maths!

    =MOD(A1+90;180) didn't work - I replaced the semicolon ( ; ) with a
    comma ( , ) - you probably meant this


  8. #8
    Chris.Holland16@gmail.com
    Guest

    Re: brainteaser: change a value by 90 (but answer must lie between 0-180 )


    Ron Rosenfeld wrote:

    > On 15 Nov 2005 11:11:04 -0800, Chris.Holland16@gmail.com wrote:
    >
    > >
    > >Please see below ( I want to do step 3 - change a value by 90 degrees)
    > >but the answer has to be between 0 and 180
    > >
    > >e.g. 45 becomes 90
    > >
    > >e.g. 95 becomes 185 (but this is wrong, so SUBTRACT 90 instead) anwer
    > >is 5
    > >

    >
    >
    > =MOD(A1+90,180)+(MOD(A1+90,180)=0)*180
    >
    >



    Ron,


    PERFECT

    I have just realised that your answer is perfect


  9. #9
    Chris.Holland16@gmail.com
    Guest

    Re: brainteaser: change a value by 90 (but answer must lie between 0-1


    Chris.Holland16@gmail.com wrote:

    > bpeltzer wrote:
    >
    > > =mod(a1+90,180) will constrain the sum of a1 and 90 to the range of 0-180.
    > >

    >
    >
    > Thanks you - that's excellent.
    >
    > but how do i contrain sum from 1 to 180 (not 0 to 180)
    >
    > (so 90 degrees becomes 180 instead of 0)


    Sorry - ignore this comment . Ron did it correctly:
    =MOD(A1+90,180)+(MOD(A1+90,180)=0)*180

    Ron if you have time, please can you explain your formula (if possible)


  10. #10
    Ron Rosenfeld
    Guest

    Re: brainteaser: change a value by 90 (but answer must lie between 0-1

    On 15 Nov 2005 11:51:42 -0800, Chris.Holland16@gmail.com wrote:

    >
    >Chris.Holland16@gmail.com wrote:
    >
    >> bpeltzer wrote:
    >>
    >> > =mod(a1+90,180) will constrain the sum of a1 and 90 to the range of 0-180.
    >> >

    >>
    >>
    >> Thanks you - that's excellent.
    >>
    >> but how do i contrain sum from 1 to 180 (not 0 to 180)
    >>
    >> (so 90 degrees becomes 180 instead of 0)

    >
    >Sorry - ignore this comment . Ron did it correctly:
    >=MOD(A1+90,180)+(MOD(A1+90,180)=0)*180
    >
    >Ron if you have time, please can you explain your formula (if possible)



    I just made '0' a special case.

    The first part of the function:

    =MOD(A1+90,180)

    constrains the results to 0-179.

    By changing the '0' to '180', we constrain the results to 1-180.

    The function (MOD(A1+90,180)=0) will evaluate to TRUE or FALSE. In
    Excelspeak, TRUE = 1 and FALSE =0. So if the function evaluates to '0', we
    then have:

    =0 + TRUE * 180
    =0 + 1*180
    =180.

    If the first part evaluates to anything other than 0,then the second part
    evaluates to 0*180 = 0 so it is ignored.

    It's really the same as writing:

    =MOD(A1+90,180) + IF(MOD(A1+90,180)=0,180,0)


    --ron

  11. #11
    Ron Rosenfeld
    Guest

    Re: brainteaser: change a value by 90 (but answer must lie between 0-180 )

    On 15 Nov 2005 11:49:37 -0800, Chris.Holland16@gmail.com wrote:

    >
    >Ron Rosenfeld wrote:
    >
    >> On 15 Nov 2005 11:11:04 -0800, Chris.Holland16@gmail.com wrote:
    >>
    >> >
    >> >Please see below ( I want to do step 3 - change a value by 90 degrees)
    >> >but the answer has to be between 0 and 180
    >> >
    >> >e.g. 45 becomes 90
    >> >
    >> >e.g. 95 becomes 185 (but this is wrong, so SUBTRACT 90 instead) anwer
    >> >is 5
    >> >

    >>
    >>
    >> =MOD(A1+90,180)+(MOD(A1+90,180)=0)*180
    >>
    >>

    >
    >
    >Ron,
    >
    >
    >PERFECT
    >
    >I have just realised that your answer is perfect



    Thank you for the feedback. Glad to help.
    --ron

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1