+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    07-03-2009
    Location
    NYC, USA
    MS-Off Ver
    Excel 2003
    Posts
    2

    Clock Arithmetic or completely wrong track?

    Hi,

    Kind of admitting defeat by posting this but this has me stumped. Can't find solution on web but maybe searching on wrong terms.

    Here's my prob....

    I'm using Excel to plot the coordinates of circles and arcs for loading into Google earth. I want to build the arc based on a center bearing and width left/right of the bearing. Eg like the sketch below an arc on bearing 60 and +/-40 degrees:
    http://i40.tinypic.com/25tb0g8.gif

    My starting approach was simply to add/minus the left/right value (eg 40) to the center bearing, using MOD function to roll over. That works fine most of the time as I can then use an IF statement to evaluate if a particular bearing is within the arc (i.e if(degreevalue>=centerbearing-widthvalue....

    Where I'm having probs is where the arc crosses over the "roll-over" point in the circle.

    So, I have a list of degree values, 0 to 359. I have a centre bearing (eg 60) and a left/right degrees value (eg 40).

    What formula can I use to evaluate whether a degree value is within the arc?


    Sorry if this isn't clear

  2. #2
    Forum Moderator ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2003 & 2010
    Posts
    1,791

    Re: Clock Arithmetic or completely wrong track?

    Hi Bod,

    If your list of degree values starts at 0 degrees in cell A1, and increases down the column until it reaches 359 degrees in cell A360. Place your center bearing value is in cell D1, and the width value in cell E1.

    Place this formula in cell B1, and auto-fill it down to cell B360:

    Code:
    	
    	=IF(IF(ABS($D$1-A1)>=180,180-(ABS($D$1-A1)-180),ABS($D$1-A1))>$E$1,"No","Yes")
    HTH

    Cheers,
    Docendo discimus.

    Please consider:
    • Thanking those who helped you. Click the reputation icon in the contributor's post and add Reputation.
    • Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.

  3. #3
    Registered User
    Join Date
    07-03-2009
    Location
    NYC, USA
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Clock Arithmetic or completely wrong track?

    Wow! Thanks, yes that worked like a treat.

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.2.0