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?
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?
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?
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!
Try adding this to your Change event procedure right after your existing "If..End If" block...
Please Login or Register to view this content.
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!
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.
Got it. Thanks. Works great!
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?
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...
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.Please Login or Register to view this content.
Last edited by Rick Rothstein; 08-01-2020 at 06:58 PM.
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.
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!
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...
with this one...Please Login or Register to view this content.
Please Login or Register to view this content.
Rick, thanks. Works great! I can usually figure out formulas, but the codes I have no clue.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks