Hi Everyone,
How would someone go about converting time to degrees automatically in excel 2019?
I have attached a file of what I am trying to do automatically.
Hi Everyone,
How would someone go about converting time to degrees automatically in excel 2019?
I have attached a file of what I am trying to do automatically.
18:00:00 CANNOT be both 0 and 360 ...
What about 17:00 and 19:00???
Last edited by AliGW; 01-10-2024 at 07:51 AM.
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
Forum Rules (updated August 2023): please read them here.
Please try in B2 and copy down:Formula:Please Login or Register to view this content.
Is there a degrees format in excel?
Last edited by AliGW; 01-10-2024 at 08:00 AM. Reason: Please don't quote unnecessarily - use the Quick Reply button instead.
Set a custom format:
0"°"
Or change the formula:
=MOD((A2-TIME(18,0,0)),1)*360&"°"
EDIT: ° is ALT+0176 on the numeric keypad.
Are we any closer to a solution now???
Also custom formatting without "" does the job: (only 0°)
Note: ° = Press ALT and type 0176
Yes, you're right, Hans.
It works in the excel spreadsheet you gave me
when I try to hold the the "alt" key and type in "0176" or "+0176" I can't do it on my own
I can copy and paste between spreadsheets and it works
wonder why it isn't working on my own
Last edited by AliGW; 01-10-2024 at 08:26 AM. Reason: Please don't quote unnecessarily - use the Quick Reply button instead.
I don't have round numbers for the time most of the time and it's giving me a long decimal
The round function isn't working
See attached file
You need to make sure that the numeric keypad (NumLock) is set to ON.
ROUND works fine:
=ROUND(MOD((A2-TIME(18,0,0)),1)*360,0)&"°"
BEAUTIFULLLLLLLLLLLLLLLLL
I had the ",1" in the wrong place
Last edited by AliGW; 01-10-2024 at 08:30 AM. Reason: Please don't quote unnecessarily - use the Quick Reply button instead.
Glad to have helped.
If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.
Also, if you have not already done so, you may not be aware that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.
Thanks...I hope everyone got my add reputation I did
Last edited by AliGW; 01-10-2024 at 09:04 AM. Reason: Please don't quote unnecessarily - use the Quick Reply button instead.
May be you are using a MAC? ALT0176 works only on Windows.I can't do it on my own
Thanks for the feedback and rep . Glad to have helped.
If the OP is on a Mac, then their profile should show this (e.g. 2019 Mac).
I am using windows no idea why it's working over there and not over here.
Ok I have another issue to solve. So I added another column and the purpose is to divide the week into degrees as well.
I plan to do it with the month and year as well.......but one thing at a time
I made a couple attempts to manipulate the formula. Namely changing the time value from 18 to 90 that didn't work, dividing by 5 that only works for a day.
The column H should get the data from column D that is the complete date and time of the year.
Here is the math for column H
COLUMN H:
1 WEEK
5 DAYS PER WEEK
24 HOURS PER DAY
60 MIN PER HOUR
360 DEGREES PER WEEK
0.05 DEGREES PER MINUTE
3 DEGREES PER HOUR
72 DEGREES PER DAY
360 DEGREES PER WEEK
Any help would be appreciated
I have attached the file of my attempt
Thanks,
Ivan
This would involve converting the date to a number, then getting the start date of the year week to be zero and Friday at 6:00 pm to be 360
Thanks for the feedback and reputation, glad to have helped. .
If you want 72 degrees per day, startting with date A2 and time C2:
Please try this and copy down:Formula:Please Login or Register to view this content.
But if you start Monday 6:00 PM with 0°, then you will reach 360° on Saturday, because Saturday is 360/72 = 5 days after Monday.
If you want reach 360° on Friday, you should replace in the formula 72 with 90 (90 = 360/4), because Friday is 4 days after Monday.
No problem thanks for the help.
Ok so we need to explain a little bit more here what's going on this kind of works but it only worked for the first week then the degrees keep going higher instead of resetting after a week.
So I am trying to do this for the day, week, month, year
column G "IDEG" works perfect the day's start at 6:00 pm est and that is 0 degrees and they end at 5:00 pm est which is 345 degs and they start again at 0 degrees so this works perfect
column H "WDEG" is a week which is 360 degrees and it starts sunday at 6:00 pm and ends Friday at 5:00 pm which is 345 degrees, then resets to 0 degrees every sunday
column I "MDEG" is a month which is 360 degrees and it starts on 6:00 pm on the first of the month and ends at 6:00 pm the last day of the month, it should reset to 0 degrees every month
column J "YDEG" is a year which is 360 degrees and it starts on 6:00 pm on the first day of the year and ends at 6:00 pm the last day of the year, so the sheet should go from 0 to 360 the entire year and then reset the next year
I have attached a spreadsheet with more than a months data in a new column IDATA (2)
I hope I am starting the problem clearly? I can further elaborate if needed.
Last edited by HajdukZD; 01-14-2024 at 07:27 PM.
The day ends at 5:59:59.99... PM which is 359.99.. degrees.
I say for convenience. The day ends at 6 PM which is 360 degrees.
. Why does the week not ends at Friday 6 PM which is 360 degrees?The week ends Friday at 5:00 pm which is 345 degrees
In that case Friday 5:00 PM is 357 degrees (not 345 degrees), because than we should counting 3 degrees pro hour,
So Monday 6:00 PM is 72 degrees. Is that OK?the week starts at Sunday 6:00 pm
What should the month formula return between the last day of the month 6:00 PM and the first day of the next month 6:00 PM?The month starts on 6:00 pm on the first of the month and ends at 6:00 pm the last day of the month
For example The first day of the month at 9:00 AM.
Not every month is counting in the degrees in the same speed, because not every month has the same length.
Is that OK?
Not every year is counting the degrees in the same speed, because not every year has the same length.
[A leap year is 366 days and other years are 365 days]
Is that OK.
What should the year formula return between the last day of the year 6:00 PM and the first day of the next year 6:00 PM?
What should the week formula return between Friday 6 PM and Sunday 6 PM?
Last edited by HansDouwe; 01-14-2024 at 08:50 PM.
Thanks for the answers:
The month formula ends also at the first day of the month 6:00 PM. That is 360 degrees.
OK I understand. So if the month has 30 days the formula should counting 360/30 is 12 degrees each day.
That is easy.
But I don't understand the annual calculation. In the first place, a leap year can also include an extra working day. That depends on what the first day of the leap year is.
2024 has 53 Mondays, 53 Tuesdays, 52 Wednesdays, 52 Thursdays and 52 Fridays. Total is 262.
In addition, I don't understand your year calculation over the working days. Could you give an example of what the annual formula should indicate this year on Monday, January 1st 6 PM, Friday, January 5th 6 PM, Sunday January 7th 6 PM, Friday January 12th 6 PM and Sunday January 14th 6 PM?
And what should the week formula return between Friday 6 PM and Sunday 6 PM?
Last edited by HansDouwe; 01-14-2024 at 10:37 PM.
I believe my math is correct.....let's see
OK, you don't have times between friday 6 PM and Sunday 6 PM in your sheet. Right?
Could you also answer my questions about the annual formula?
I don't understand why you count the same degrees for the first week as for the second week.
The first week only has 4 days (no Sunday on Monday), the second week has 5 days.
In addition, you now count 360/365 degrees per working day. This means you only end up at 256 degrees after 52 weeks.
Now that you want to stop the degrees clock for 48 hours every week for the annual formula, it is better to make the formula such that we end up at 360 degrees exactly on the last working day of the year at 6 PM. Regardless of whether it is a leap year or not. A year can contain 260, 261 or 262 working days, but if I have to count from January 1, 6:00 PM to December 31, 6:00 PM, that is 364 days in a regular year or 365 days in a leap year. And those years can contain 260 or 261 working days (depending on the day the year begins.) Is that OK?
Should the monthly clock run during the weekends or should it also run faster during the week, so that it can be stopped during the weekend?
Last edited by HansDouwe; 01-15-2024 at 01:36 AM.
I was still thinking about the monthly clock and the yearly clock.
The weekly clock lets you start at 6 PM for the first working day of the week and end up at 6 PM on Friday exactly 5 days later.
Then it also seems logical to me to have the monthly clock start at 6 PM of the last day of the previous month (and to run until 6 PM of the last (working) day of the month.
The same for the annual clock.
How do you think you about that?
Last edited by HansDouwe; 01-15-2024 at 01:42 AM.
Custom format cells 0° or 0.00°
IDEG: Day = 18:00:00 - 18:00:00 Please try:Formula:Please Login or Register to view this content.
WDEG: Week = SUN 18:00:00 - FRI 18:00:00:Formula:Please Login or Register to view this content.
MDEG: Month = last day previous month 18:00:00 - last day month 18:00:00 (and does not count FRI 18:00:00 - SUN 18:00:00):Formula:Please Login or Register to view this content.
YDEG: Year = last day previous year 18:00:00 - last day year 18:00:00 (and does not count FRI 18:00:00 - SUN 18:00:00):Formula:Please Login or Register to view this content.
Last edited by HansDouwe; 01-16-2024 at 05:30 AM.
WOW this is a great attempt! I am trying to get the logic of the formulas.
Unfortunately the WDEG isn't working it goes until 522 degrees then resets, the deg count should reset at sunday at 6:00 pm = 0 deg
The MDEG and YDEG are giving me errors my excel 2019 doesn't like the formula #NAME?
I will play around a little bit see if I an fix it ............WOW you did great with these formulas
Last edited by AliGW; 01-16-2024 at 12:23 PM. Reason: Please don't quote unnecessarily - use the Quick Reply button instead.
LET is only available in 2021 and 365.The MDEG and YDEG are giving me errors my excel 2019 doesn't like the formula #NAME?
Try:
=(NETWORKDAYS(1+EOMONTH(D2+1/4,-1),D2+1/4)-1+MOD(D2+1/4,1))/NETWORKDAYS(1+EOMONTH(D2+1/4,-1),EOMONTH(D2+1/4,0))*360
and:
=(NETWORKDAYS(1+EOMONTH(D2+1/4,-1),D2+1/4)-1+MOD(D2+1/4,1))/NETWORKDAYS(1+EOMONTH(D2+1/4,-MONTH(D2+1/4)),EOMONTH(D2+1/4,12-MONTH(D2+1/4)))*360
Last edited by AliGW; 01-16-2024 at 12:27 PM.
Excel is giving me this for the MDEG
=_xlfn.LET(_xlpm.t,D2+1/4,(NETWORKDAYS(1+EOMONTH(_xlpm.t,-1),_xlpm.t)-1+MOD(_xlpm.t,1))/NETWORKDAYS(1+EOMONTH(_xlpm.t,-1),EOMONTH(_xlpm.t,0))*360)
And this for the YDEG
=_xlfn.LET(_xlpm.t,D2+1/4,(NETWORKDAYS(1+EOMONTH(_xlpm.t,-1),_xlpm.t)-1+MOD(_xlpm.t,1))/NETWORKDAYS(1+EOMONTH(_xlpm.t,-MONTH(_xlpm.t)),EOMONTH(_xlpm.t,12-MONTH(_xlpm.t)))*360)
It looks like certain forumals aren't available in this version of excel
It looks like it's the LET function and t funciton I will test it out more
See post #34!!!
WOW this formula works...........wow great job!
Our math is wrong somewhere.........we get errors in the degrees see attached spreadsheet.......I have to think about this a while .......we may want the month and years to begin at midnight and the day and week to start at sunday at 6:00 pm......I think this will clear up the errors.........
This is it we need the month and year degs to start at midnight.......
the day and week degrees have to start sunday at 6:00 pm and end friday at 6:00 pm.
So the day degrees work with the current formula
the week degrees don't work it doesn't reset properly
the monthly and yearly degrees have to start at midnight and end at midnight........
WE ARE SOOOOO CLOSEEEEEEE
please see attached spreadsheet
Last edited by AliGW; 01-16-2024 at 12:50 PM.
I can't help with the maths - sorry.
Thanks for the feed back and rep . Glad to have helped.
Now de finishing touche,
OK. Does this rule still apply?the monthly and yearly degrees have to start at midnight and end at midnight........The error in the weekly clock on Sunday evening is clear to me and I will correct it.The monthly clock should stop during the weekends, we only want the monthly clock to run during working days, from 6:00 pm Sunday to 6:00 pm Friday
Yes the monthlyl close should stop on weekends..........so it should run from Midnight on the 1st until Friday 6:00 pm, then pause and start up again on Sunday 6:00 pm, and run until midnight on the last day of the month
same with the yearly, it should start on Midnight on the 1st, and run until Friday 6 pm, then pause until sunday 6:00 pm before resuming.
Thsi was my mistake on the math at the beginning......AliGWs equations work over here
Last edited by AliGW; 01-17-2024 at 02:50 AM. Reason: Please don't quote unnecessarily - use the Quick Reply button instead.
OK. The requirements are clear to me. I'll fix that Wednesday night.
I am exciteddddddddddddddddddddddddddd
Last edited by AliGW; 01-18-2024 at 09:19 AM. Reason: Please don't quote unnecessarily - use the Quick Reply button instead.
Here are the new formulas belonging to these conditions:
IDEG: Day = 18:00:00 - 18:00:00
WDEG: Week = SUN 18:00:00 - FRI 18:00:00
MDEG: Month = first day month 00:00:00 - last day month 24:00:00
(and does not count FRI 18:00:00 - SUN 18:00:00
YDEG: Year = first day year 00:00:00 - last day year 24:00:00
(and does not count FRI 18:00:00 - SUN 18:00:00)
IDEG: No change
WDEG: Please try:Formula:Please Login or Register to view this content.
MDEG: Please try:`Formula:Please Login or Register to view this content.
YDEG: Please try:Formula:Please Login or Register to view this content.
Last edited by HansDouwe; 01-17-2024 at 11:32 PM.
The weekly function is working!!!! perfectly as well
however my version of excel doesn't let me use the "LET" function
here are the formulas that ALIGW gave but that do not reset properky
MDEG
=(NETWORKDAYS(1+EOMONTH(D2+1/4,-1),D2+1/4)-1+MOD(D2+1/4,1))/NETWORKDAYS(1+EOMONTH(D2+1/4,-1),EOMONTH(D2+1/4,0))*360
YDEG
=(NETWORKDAYS(1+EOMONTH(D2+1/4,-1),D2+1/4)-1+MOD(D2+1/4,1))/NETWORKDAYS(1+EOMONTH(D2+1/4,-MONTH(D2+1/4)),EOMONTH(D2+1/4,12-MONTH(D2+1/4)))*360
I will try to take a look to see if I can modify the formulas to work in excel 2019.......
But yesssssss the WDEGs work! Halfway done!
Thank you!!!
Last edited by AliGW; 01-18-2024 at 09:20 AM. Reason: Please don't quote unnecessarily - use the Quick Reply button instead.
2019 does not have LET, as I noted in post #34.
Administrative Note re. Forum Guideline #2:
Please don't quote whole posts, especially when you are responding to the one immediately preceding your own - it's just clutter and rarely necessary.
If you are responding out of sequence, it is usually enough just to mention the helper's user name (e.g @AliGW).
If you do need to quote, limit the quoted section just to the section to which you wish to draw your helper's attention or a direct question to which you wish to respond.
For normal conversational replies, try using the QUICK REPLY box below or the REPLY button instead of REPLY WITH QUOTE.
The last post wasn't a quote so I don't know what is this post about
It doesn't need a quote as it was referring to YOUR post immediately before it (post #45), where you had unnecessarily quoted the whole of post #44. I have removed some of the unnecessary quoting in this thread.
Once again, if you are answering the post immediately BEFORE your own, there is NO NEED AT ALL to quote it.
These formulas without LET works in Excel 2019:
MDEG Please try:YDEG Please try:Please Login or Register to view this content.
Please Login or Register to view this content.
This is very accurate.......this is close enough to work.......the first month starts at 12 deg but should start at 0 deg but that corrects itself in the second month.
Can we get the first month to start at 0 deg?
6 hours doesn't matter much over the year specially with the rounding.
Can we add in a column for the quarters? So there would be 360 degrees every 3 months?
But thank you!!!
The first of the month MDEG also starts at 0 degrees.
The MDEG rule is:January 1, 2024 is a Monday and the MDEG of Monday January 1, 2024 0:00 returns 0 degrees.first day month 00:00:00 - last day month 24:00:00
(and does not count FRI 18:00:00 - SUN 18:00:00).
Your table does not start Monday January 1, 2024 0:00, but your table start Monday January 1, 2024 18:00
Last edited by HansDouwe; 01-20-2024 at 03:20 AM.
Yeah you are right 18 hours is 12 degrees...............
Can we add in a quarterly clock? Where we divide the year up in quarters so every 3 months?
3 months = 360 degrees. There would be 4 of them every year.
I attached the spreadsheet and added the column in
Last edited by HajdukZD; 01-20-2024 at 10:17 AM.
Hi can someone (Hans!) help me covert the QDEG column into degrees?
I believe I was able to calculate the time passed in the quarter and it should reset every quarter.
Please see the attached file.
Thanks in advance
This equation kind of does it but it isn't correct it's a continuous clock
=IF(MONTH(A1)<=3, ((A1-DATE(YEAR(A1),1,1))/90)*360, IF(MONTH(A1)<=6, ((A1-DATE(YEAR(A1),4,1))/91)*360, IF(MONTH(A1)<=9, ((A1-DATE(YEAR(A1),7,1))/92)*360, ((A1-DATE(YEAR(A1),10,1))/92)*360)))
QDEG:
Please try:Please Login or Register to view this content.
thank you sir will check it out
seems to work I tried to give you some more reputation it's not letting me ..............thanks again!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks