The problem is that Excel doesn't really "SEE" the hours, minutes, and seconds. What it "SEE"'s is a number.
The date: Tuesday, November 13, 2012 16:48:41 is actually a number: (41226.700474537) DISPLAYED any way that you'd like it! This number is the number of days (41226) since 1/1/1900. The decimal portion (.700474537) is the fractional part of a day So, what you're really wanting to do is to round this number off the equivalent of the number of minutes in a day. ----------------------------------------------- Let's say your "date" is in cell A2: So, since the number of minuts/day is 24hrs/day * 60min/hr = (24*60) thenthe number of MINUTES in this date is: ------------------ =A2*(24*60) ------------------ The decimal portion of this result represents the fractional part of a minute, or "seconds", so we'd like to keep only the "integer" portion: ------------------ =INT(A2*(24*60)) ------------------ Next, we need to convert it back to days by dividing it by the number of seconds/day: ------------------------- =INT(A2*(24*60))/(24*60) ------------------------- the other option is to "build" the date string like this: =DATE(YEAR(A2),MONTH(A2),DAY(A2)) +TIME(HOUR(A2),MINUTE(A2),0) In this case, the Date() function uses the year/month/day to calculate the INTEGER number of days since 1/1/1900. The time function calculates the fractional part of a day (using 0 seconds) Adding the two together results in a number: in this case: 41226.7 which can be DISPLAYED as a date and time: Tuesday, November 13, 2012 16:48:00 hope this helps. Paul ----------------------------------------- “Do all the good you can, By all the means you can, In all the ways you can, In all the places you can, At all the times you can, To all the people you can, As long as ever you can.” - John Wesley ----------------------------------------- ________________________________ From: Bill Q <ronsmith...@gmail.com> To: excel-macros@googlegroups.com Sent: Fri, November 16, 2012 12:17:53 PM Subject: Re: $$Excel-Macros$$ Looking for formula to extract hours and minutes Hi Sam, Thanks for the advice. Yes, I had tried that. Yes, it visually changes it to what I want, but again - the "true" time still indicates seconds in addition to the hours and minuites. Under normal circumstances this may not be an issue, however I am using a vlookup formula afterwards for further data manipulation. I will unable to get a proper match because it continues to "see" the seconds. Any other possible ideas ? On Friday, November 16, 2012 11:03:45 AM UTC-5, Sam Mathai Chacko wrote: Why don't you simply format the cell using custom format h:mm AM/PM > >Regards, >Sam Mathai Chacko > > > > >On Fri, Nov 16, 2012 at 9:28 PM, Bill Q <ronsm...@gmail.com> wrote: > >Hi, >> >>I am looking for a formula that would extract hours and minutes. I want it to >>ignore the date and seconds and not round the minutes based on the seconds. >>Preferably wither in military time or with AM?PM so that it can be sortable. >>Here is the way the data is currently formatted. >> >>This is what is visually seen in the cell. 13/11/2012 16:48 >>This is what is seen when you click on the cell. 13/11/2012 4:48:41 PM >>What I would prefer to see is either just 16:48 or 4:48 PM >>Thanks. >> -- >>Join official facebook page of this forum @ https://www.facebook.com/ >>discussexcel >> >>FORUM RULES (1120+ members already BANNED for violation) >> >>1) Use concise, accurate thread titles. Poor thread titles, like Please Help, >>Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not >>get >>quick attention or may not be answered. >> >>2) Don't post a question in the thread of another member. >> >>3) Don't post questions regarding breaking or bypassing any security measure. >> >>4) Acknowledge the responses you receive, good or bad. >> >>5) Cross-promotion of, or links to, forums competitive to this forum in >>signatures are prohibited. >> >> >>6) Jobs posting is not allowed. >> >>7) Sharing copyrighted ebooks/pirated ebooks/their links is not allowed. >> >>NOTE : Don't ever post personal or confidential data in a workbook. Forum >>owners >>and members are not responsible for any loss. >>--- >>You received this message because you are subscribed to the Google Groups "MS >>EXCEL AND VBA MACROS" group. >>To post to this group, send email to excel-...@googlegroups.com. >>To unsubscribe from this group, send email to excel-macros...@ >googlegroups.com. >>Visit this group at http://groups.google.com/group/excel-macros?hl=en. >> >> >> > > >-- >Sam Mathai Chacko >-- Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups "MS EXCEL AND VBA MACROS" group. To post to this group, send email to excel-macros@googlegroups.com. To unsubscribe from this group, send email to excel-macros+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/excel-macros?hl=en. -- Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups "MS EXCEL AND VBA MACROS" group. To post to this group, send email to excel-macros@googlegroups.com. To unsubscribe from this group, send email to excel-macros+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/excel-macros?hl=en.