+ Reply to Thread
Results 1 to 13 of 13

format cells to cardinal wind directions

  1. #1
    Registered User
    Join Date
    07-05-2019
    Location
    usa
    MS-Off Ver
    2016
    Posts
    24

    format cells to cardinal wind directions

    In the following example I would to have the cells L17 to L31 formatted so that if I out it the wind direction in degrees it automatically changes it to the direction. N, NNE, NE, ect. How can this be done?
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,410

    Re: format cells to cardinal wind directions

    Three things...

    1) You said cells L17 to L31... you meant cells M17 to M31, correct?

    2) Do you want the cardinal wind directions to replace the degrees immediately as they are entered?

    3) How you input the wind direction in degrees... degrees measured counter-clockwise from due north (0 to 360 degrees) or some other method?

  3. #3
    Registered User
    Join Date
    07-05-2019
    Location
    usa
    MS-Off Ver
    2016
    Posts
    24

    Re: format cells to cardinal wind directions

    Sorry . Yes I meant cells M17 to M31. And yes I would like the wind directions to replace degrees immediately as they are entered. Degrees would be N is 0, E is 90, S is 180, which should be clock wise.

    Thanks
    Last edited by AliGW; 08-02-2020 at 11:59 AM. Reason: Please don't quote unnecessarily!

  4. #4
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,410

    Re: format cells to cardinal wind directions

    Try adding this to your Change event procedure right after your existing "If..End If" block...
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    07-05-2019
    Location
    usa
    MS-Off Ver
    2016
    Posts
    24

    Re: format cells to cardinal wind directions

    Sorry, not sure I know what you mean Change event procedure.
    Last edited by AliGW; 08-02-2020 at 11:58 AM. Reason: Please don't quote unnecessarily!

  6. #6
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,410

    Re: format cells to cardinal wind directions

    It is the one you created on the worksheet's code module. Right-click the worksheet's name tab and select "View Code" from the popup menu that appears... the Change event procedure you created is located on the code window that appears... put what I posted into that where I indicated it should go.

  7. #7
    Registered User
    Join Date
    07-05-2019
    Location
    usa
    MS-Off Ver
    2016
    Posts
    24

    Re: format cells to cardinal wind directions

    Got it. Thanks. Works great!

  8. #8
    Registered User
    Join Date
    07-05-2019
    Location
    usa
    MS-Off Ver
    2016
    Posts
    24

    Re: format cells to cardinal wind directions

    Thanks again. one more question. How can I keep it that if I put N, S E W or whatever direction instead of degrees to have it be capital letters?

  9. #9
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,410

    Re: format cells to cardinal wind directions

    Actually, I had you place the code incorrectly (doesn't affect accuracy, but does have the event execute twice (doing nothing the second time). Instead of describing how to correct it, here it is corrected (just replace your existing Change event procedure with this one which also handles automatically upper casing any text entry you put in the cell...
    Please Login or Register  to view this content.
    QUESTION: Are the cardinal points you asked me to use correct? Shouldn't NNE actually simply be NE, SSE be SE, SSW be SW and NNW be NW? I think of NNE as being between N and NE (that is, it is more north than NE). If you agree, simply change them in the long line of code above. And, if you agree they should be NE, SE, SW and NW and would like the intermediate cardinal points between them, I can modify the code to add them (namely, NNE, ENE, ESE, SSE, SSW, WSW, WNW and NNW)... just let me know.
    Last edited by Rick Rothstein; 08-01-2020 at 06:58 PM.

  10. #10
    Registered User
    Join Date
    07-05-2019
    Location
    usa
    MS-Off Ver
    2016
    Posts
    24

    Re: format cells to cardinal wind directions

    Thanks. I think you are right. the directions are off. Don't have time to look at in now. Tomorrow is another day. Thanks will let you know.

  11. #11
    Registered User
    Join Date
    07-05-2019
    Location
    usa
    MS-Off Ver
    2016
    Posts
    24

    Re: format cells to cardinal wind directions

    QUESTION: Are the cardinal points you asked me to use correct? Shouldn't NNE actually simply be NE, SSE be SE, SSW be SW and NNW be NW? I think of NNE as being between N and NE (that is, it is more north than NE). If you agree, simply change them in the long line of code above. And, if you agree they should be NE, SE, SW and NW and would like the intermediate cardinal points between them, I can modify the code to add them (namely, NNE, ENE, ESE, SSE, SSW, WSW, WNW and NNW)... just let me know.[/QUOTE]

    You are correct and I do need it to have the 16 cardinal points.
    Last edited by AliGW; 08-02-2020 at 11:58 AM. Reason: Please don't quote unnecessarily!

  12. #12
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,410

    Re: format cells to cardinal wind directions

    Please do not quote entire messages when replying to a thread post (it wastes space on the server unnecessarily). If you need to refer to part of a message for reference, then quote only that part. If you are not referencing the code, simply post the name of the person who you are replying to (so they know to respond) and then your message to them.

    For your 16 cardinal points, replace this line of code from my last posted code...
    Please Login or Register  to view this content.
    with this one...
    Please Login or Register  to view this content.

  13. #13
    Registered User
    Join Date
    07-05-2019
    Location
    usa
    MS-Off Ver
    2016
    Posts
    24

    Re: format cells to cardinal wind directions

    Rick, thanks. Works great! I can usually figure out formulas, but the codes I have no clue.

+ 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. Function to convert cardinal wind direction to degrees
    By Emma!69 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-08-2019, 01:58 PM
  2. Average of many wind directions
    By tdk123 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-20-2019, 08:53 AM
  3. Replies: 1
    Last Post: 08-16-2013, 05:25 PM
  4. Average of directions wind
    By nunito in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-17-2013, 08:31 AM
  5. Averaging Wind Directions
    By Andrew_H92 in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 03-16-2013, 07:38 PM
  6. Number format:Displays results as cardinal text
    By Mani K in forum Excel General
    Replies: 2
    Last Post: 12-28-2005, 07:01 AM
  7. How do I average wind directions using excel?
    By Rex Morgan in forum Excel General
    Replies: 2
    Last Post: 10-13-2005, 01:05 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