Consulting

Results 1 to 8 of 8

Thread: need help understanding How to invert number. please

  1. #1
    VBAX Mentor
    Joined
    Feb 2016
    Posts
    382
    Location

    need help understanding How to invert number. please

    I want to do something similar with values but need help on how to achieve how to invert values that they discuss in here.

    In the speardsheet alongside, we placed 1 in A1. In B1 we invert the value of A1. In C1 we add one to the value in B1. In D1, we invert the value in C1. In A2, we add 1 to the value in D1 and copy all these formulae downwards. You can see how quickly the result in column A becomes the Golden Ratio.
    Important: This result does not depend on the first entry. One can place any value other than 0 into A1 and the process will work. Below you can see that the number 50 in A1 produces the Golden ratio in just 9 steps.
    I will attach file when I return home Thank you in advance for your help!

  2. #2
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,814
    Location
    B1 Formula
    =If(A1<>0),(1/((1/A1)+1)+1),0)

    A2 Formula
    =If(B1<>0,B1+1,0)

    Fill Down both.

    BTW, Excel calculates to 15 decimal places, although with rounding errors in the 15th.
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

  3. #3
    VBAX Mentor
    Joined
    Feb 2016
    Posts
    382
    Location
    Thank you!!! I prepare worksheet when I get home.
    Does this include the C. And D columns?

  4. #4
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,814
    Location
    Does this include the C. And D columns?
    No. All the math from B to D is included in the B1 formula.

    If("Cell" <> 0, . . . is error prevention. If A1 is a zero, all cells with formulas will display zeros to indicate that they are working
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

  5. #5
    VBAX Mentor
    Joined
    Feb 2016
    Posts
    382
    Location
    When i enter the formaula B1 Formula
    =If(A1<>0),(1/((1/A1)+1)+1),0)


    I get " the formula you typed contains an error"

    Tried removing a parenthesis after the =if(A1<>0,(
    1/((1/A1)+1)+1),0)

    and no error occurred is this correct? I just want to make sure results are accurate.
    Last edited by estatefinds; 08-02-2016 at 03:30 PM.

  6. #6
    VBAX Mentor
    Joined
    Feb 2016
    Posts
    382
    Location
    ok Im adding file.
    I placed the number 1 and the result is only in column B but not in C and D. Can this file im sending mimic what i see in the original post?
    I want work with it to get it what i want to do with My data. its not giving me the 1.618

    Thank you
    Attached Files Attached Files
    Last edited by estatefinds; 08-02-2016 at 05:37 PM.

  7. #7
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,814
    Location
    Yeah, there was an extra +1 in my original B1 formula

    If you must have all four columns, to invert a number just divide 1 by the number (=1/A1)

    To ignore all columns except Column A:

    If you just want to show the progression from A1 to the Golden Ratio, place this formula in A2 and copy it down.
    =IF(A1<>0,(1/((1/A1)+1)+1),0)

    Then, if you want to the results to indicate when the Golden Ratio is reached as far as Excel can take it, place this one in A3 and copy it down to about A25.
    =IF(A2=A1,,IF(A2<>0,(1/((1/A2)+1)+1),))
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

  8. #8
    VBAX Mentor
    Joined
    Feb 2016
    Posts
    382
    Location
    Thank you I got it working! the formula B1 i tried removing the +1 and kept getting error. so i replaced the +1 and I then removed parenthese after the first Zero and it worked again.

    Great job helping me on this thanks again!

Posting Permissions

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