+ Reply to Thread
Results 1 to 18 of 18

Determining the range of an angle on a 360 modulus using XLOOKUP or...

  1. #1
    Registered User
    Join Date
    12-10-2020
    Location
    usa
    MS-Off Ver
    office 2020
    Posts
    9

    Determining the range of an angle on a 360 modulus using XLOOKUP or...

    Hello All,

    This is my first time posting, although I have found numerous helpful examples . (Thank You!)

    I am attempting to use XLOOKUP to determine if a cell value falls within the range of one of twelve House positions, (Column A) and returning the proper house position in row 23 (Columns C > MX)

    I found a Formula that seems to work, [ =XLOOKUP(0,ABS(C$2:C$13-C22), $A$2:$A$13, ,1) ] but some of the values returned either round up or round down returning the inappropriate House value.

    ex: C23 should be 6th instead of 7th, E23 should be 5th instead of 6th, G23 should be 4th instead of 5th

    I think I may be looking for a Nested If Statement, but cannot wrap my head around a proper way of determining if a value lies within a house that has a beginning value of 359 and an ending value of 29.

    ex:Cell C9

    Lookup example.jpg


    I appreciate any guidance anyone can provide, Thank you.
    Attached Files Attached Files
    Last edited by quixotic77; 05-26-2023 at 12:08 PM.

  2. #2
    Forum Contributor John Vergara's Avatar
    Join Date
    01-17-2022
    Location
    Colombia
    MS-Off Ver
    365
    Posts
    200

    Re: Determining the range of an angle on a 360 modulus using XLOOKUP or another function?

    Hi!

    One option could be:
    PHP Code: 
    =XLOOKUP(C22,C2:C13,$A2:$A13,"",-1
    And drag it to the right. Blessings!
    A out-of-context text is a pretext.
    Consider adding reputation points to all the people who help you with your question/problem.

  3. #3
    Registered User
    Join Date
    12-10-2020
    Location
    usa
    MS-Off Ver
    office 2020
    Posts
    9

    Re: Determining the range of an angle on a 360 modulus using XLOOKUP or another function?

    John,

    Thank you for the reply(and code)... that formula seems to work for most of the cells, but I do not receive a return value for values that lie between ~355--> ~24 degrees. (ex:J23)

    some of the value that cross the 360 degree mark do not provide a return value. all the other values are perfect, but I cant seem to find a way to register cell value that cross the 359 degree mark, crossing into 0+.

    Forgive Me if I am stating incorrectly.

    Thank You.

    Ex2.jpg

  4. #4
    Registered User
    Join Date
    12-10-2020
    Location
    usa
    MS-Off Ver
    office 2020
    Posts
    9

    Re: Determining the range of an angle on a 360 modulus using XLOOKUP or another function?

    Quote Originally Posted by John Vergara View Post
    Hi!

    One option could be:
    PHP Code: 
    =XLOOKUP(C22,C2:C13,$A2:$A13,"",-1
    And drag it to the right. Blessings!

    I seem to understand that the Match Mode is changed to "-1" is there a way to nest an XLOOKUP within an XLOOKUP to change the match mode to "1" if the value returned is "" or not found?

  5. #5
    Forum Contributor John Vergara's Avatar
    Join Date
    01-17-2022
    Location
    Colombia
    MS-Off Ver
    365
    Posts
    200

    Re: Determining the range of an angle on a 360 modulus using XLOOKUP or another function?

    Hi again!

    Is this what you looking for? (any of these):
    PHP Code: 
    =XLOOKUP(C22,C2:C13,$A2:$A13,XLOOKUP(C22,C2:C13,$A2:$A13,"",1),-1)
    =
    LET(h,XLOOKUP(C22,C2:C13,$A2:$A13,"",{-1;1}),@FILTER(h,h>"")) 
    Blessings!

  6. #6
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,069

    Re: Determining the range of an angle on a 360 modulus using XLOOKUP or another function?

    Alternatively, =INDEX($A$2:$A$13,MATCH(C22-MIN(FILTER(C22-C2:C13,C22-C2:C13>0)),C2:C13,0))

  7. #7
    Registered User
    Join Date
    12-10-2020
    Location
    usa
    MS-Off Ver
    office 2020
    Posts
    9

    Re: Determining the range of an angle on a 360 modulus using XLOOKUP or another function?

    John,

    C'est Bon!
    Both are Great...
    You Have opened up a new world to me. (especially with the second Formula)

    Thank you Friend.
    Last edited by quixotic77; 05-25-2023 at 01:23 AM.

  8. #8
    Registered User
    Join Date
    12-10-2020
    Location
    usa
    MS-Off Ver
    office 2020
    Posts
    9

    Re: Determining the range of an angle on a 360 modulus using XLOOKUP or another function?

    Quote Originally Posted by josephteh View Post
    Alternatively, =INDEX($A$2:$A$13,MATCH(C22-MIN(FILTER(C22-C2:C13,C22-C2:C13>0)),C2:C13,0))
    Thank you for the Reply Josephteh, the formula(s) john presented appear to perform -and then some.

    I did try the formula but receive an error (#CALC) in the cells that have a value that lies between the houses that have 359->1 degree transition. I am not versed enough to understand what I need to correct to eliminate #CALC.

    Thank You.

  9. #9
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,069

    Re: Determining the range of an angle on a 360 modulus using XLOOKUP or another function?

    Please attach your workbook.

  10. #10
    Registered User
    Join Date
    12-10-2020
    Location
    usa
    MS-Off Ver
    office 2020
    Posts
    9

    Re: Determining the range of an angle on a 360 modulus using XLOOKUP or another function?

    Quote Originally Posted by josephteh View Post
    Please attach your workbook.
    Hello Josephteh, I removed and reuploaded the original attachment, as I believe the first attachment was not the correct excel file type. you may have viewed my post in the time between those two actions.

    Thank You.

  11. #11
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,069

    Re: [SOLVED] Determining the range of an angle on a 360 modulus using XLOOKUP or...

    Try,
    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    12-10-2020
    Location
    usa
    MS-Off Ver
    office 2020
    Posts
    9

    Re: Determining the range of an angle on a 360 modulus using XLOOKUP or...

    Josephteh, thank you for the additional formula.

    I did manage to create four rows with all of the previous formula suggestions... and I noticed that when a Cell value is in between 340>10 degrees that the House reflected is the next greater number.

    Ex: Column J... Cell J23, J26, J35 all reflect "10th" which is the next value in the progression, but the Value of 6.909 is actually between 354.82652 and 24.82651 which would be "9th" is there any way to show a value of "9th"?

    I thought that the code(s) would work, but just noticed this. I am stumped on how to correct.

    I think what I am trying to accomplish is to have a set of ranges that change in each column, and to reflect where a value lies on a 360 degree modulus

    The Ranges lie on a 360 Circle, but change in each column.


    ex: "Column J"

    1st= 114.82652 >>> 144.82651

    2nd=144.8652 >>> 174.82651

    3rd=174.82652 >>> 204.82651

    4th=204.82652 >>> 234.82651

    5th=234.82652 >>> 264.82651

    6th=264.82651 >>> 294.82651

    7th=294.82651 >>> 324.82651

    8th=324.82652 >>> 354.82651

    9th=354.82652 >>> 24.82651 This Is where I am having difficulty understanding

    10th= 24.82652 >>> 54.82651

    11th= 54.82652 >>> 84.82651

    12th= 84.82652 >>> 114.82651

    Thank You.
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by quixotic77; 05-25-2023 at 01:54 PM.

  13. #13
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,069

    Re: Determining the range of an angle on a 360 modulus using XLOOKUP or...

    You are right, please use this revised formula,
    Please Login or Register  to view this content.

  14. #14
    Forum Contributor John Vergara's Avatar
    Join Date
    01-17-2022
    Location
    Colombia
    MS-Off Ver
    365
    Posts
    200

    Re: Determining the range of an angle on a 360 modulus using XLOOKUP or...

    Hi to both!

    What about:
    PHP Code: 
    =VLOOKUP(IF(C19<MIN(C2:C13),MAX(C2:C13),C19),SORT(HSTACK(C2:C13,$A2:$A13)),2)
    =
    XLOOKUP(IF(C19<MIN(C2:C13),MAX(C2:C13),C19),C2:C13,$A2:$A13,"",-1
    Blessings!
    Last edited by John Vergara; 05-25-2023 at 09:44 PM.

  15. #15
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,069

    Re: Determining the range of an angle on a 360 modulus using XLOOKUP or...

    Hi John, unable to use your formula as HSTACK is not available in Excel 2020 or 2021.

  16. #16
    Registered User
    Join Date
    12-10-2020
    Location
    usa
    MS-Off Ver
    office 2020
    Posts
    9

    Re: Determining the range of an angle on a 360 modulus using XLOOKUP or...

    Hi John and Josephteh,

    Both of your solutions work and are very elegant.

    Josephteh, I appreciate the pointing out that HSTACK does not work for Excel 2020/2021 ... I guess i need to purchase an Office 365 Subscription, as It seems to have ALL the really interesting functions that make life easy

    I owe you both a debt of gratitude... Thank You!


    An interesting bit of info, Excel is not not my strong point, (thank you both again for the help) but I do study/practice Astrology.

    In one particular discipline of Astrology called "AstroCartoGraphy", a person's birth chart can be laid out on a map of the world. One can then use this map to find places that are more favorable than others for particular outcomes.

    When I posted in this forum (after Lurking for quite some time) You two were the ones that provided me with assistance.

    If you look at the Image I've attached I have circled the areas on the map where your locations are (from your Screen Name info ) and these positions corresponded with My Natal Sun and Mercury Position.

    John's Location is at the top of the Sky when I was born, and Josephteh's location is at the bottom of the sky (when i Was Born) ... these positions are 180 degrees apart from each other (on a 360 degree circle) .


    Neither one of you have to make a comment to this, but I would wager that Josephteh has a significant Aries (Tropical Zodiac position) influence and John Has a Significant Libra (Tropical Zodiac position) influence.

    I could be wrong but I found it interesting, Either Way you are both very kind and generous individuals.


    Thank you Again!!
    Attached Images Attached Images
    Last edited by quixotic77; 05-26-2023 at 12:20 PM.

  17. #17
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,069

    Re: Determining the range of an angle on a 360 modulus using XLOOKUP or...

    Interesting.. thanks for the kind words.

  18. #18
    Forum Contributor John Vergara's Avatar
    Join Date
    01-17-2022
    Location
    Colombia
    MS-Off Ver
    365
    Posts
    200

    Re: Determining the range of an angle on a 360 modulus using XLOOKUP or...

    Thanks quixotic77! That is so curious. And thanks to Josephteh for told me about the version. I hope you can (both of you) get M365 soon and try the nice functions that are there. I'm glad to help. Blessings!
    Last edited by John Vergara; 05-27-2023 at 03:49 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. VBA determining blank cells and using XLOOKUP with dynamic values
    By atakatam in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-11-2021, 03:50 PM
  2. Determining which side of a semicircle an angle lies.
    By kopity in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-17-2017, 08:36 AM
  3. Determining the Point and Angle of rotation
    By Ashraf_Robot in forum Excel General
    Replies: 9
    Last Post: 06-12-2012, 02:44 PM
  4. modulus function for a time increment on a timesheet
    By svend_ok in forum Excel General
    Replies: 2
    Last Post: 10-11-2010, 03:38 PM
  5. how to auto-convert angle in the range from 0 to 360
    By winglj in forum Excel General
    Replies: 1
    Last Post: 07-14-2010, 01:27 AM
  6. [SOLVED] Modulus Function
    By darksupernova in forum Excel General
    Replies: 2
    Last Post: 12-07-2009, 02:34 PM
  7. select range that is a right angle triangle
    By as_sass in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-21-2006, 06:21 PM

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