Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compass question excel 4

Status
Not open for further replies.

jhn1611

Marine/Ocean
Jun 9, 2023
7
Hello,

I came across a previous thread on here which had a very helpful formula to calculate the difference between 2 headings using the MOD function

I work on a vessel and we always have a reference heading of a piece of equipment on the seabead called the 'datum bore heading'.

Now throughout this job we effectively work in a square and the datum bore will always be. FWD, STBD, AFT or PORT in relation to vessel heading

Im trying to wirte a formula where I imput vessel heading and datum bore heading and it tells me FWD, STBD, AFT or PORT

Now FWD and AFT are I can manage. If the difference between two headings is 45 or less then its FWD. if its greater than 135 its AFT

Between 45 or 135 is PORT or STBD depending on which way vessel turns. If vessel turns clockwise on compass then bore heading on PORT and and if anticlockwise its STBD

Anyone know how to write such a thing on excel?

Thanks


 
Replies continue below

Recommended for you

Here's the entire VBA code.
Code:
Coming soon to IDS's blog at
[URL unfurl="true"]http://newtonexcelbach.wordpress.com/[/URL]
A more robust version with comments.
 
MintJulep said:
@Doug, check your email.

Just found that gmail rejected my e-mail and Outlook sent gmail's notification to junk, whilst letting through stuff from random spammers asking me to sign something!

Just tried again from my gmail account.


Doug Jenkins
Interactive Design Services
 
I have now posted a summary of the proposed formulas at:

The link has a download which includes both my spreadsheet and MintJulep's, which now has updated VBA code. Please let me know if any problems downloading.

Note that I have modified the tables and formulas to use (Reference Bearing - Ship Heading) as the angle, so that positive values are clockwise.

Doug Jenkins
Interactive Design Services
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor