+ Reply to Thread
Results 1 to 8 of 8

Reformat time data into decimal and remove excess charactors from field

  1. #1
    Registered User
    Join Date
    02-17-2014
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    3

    Reformat time data into decimal and remove excess charactors from field

    Hi

    I have obtained the following data which I need to put into a spreadsheet to import into an accounts program. I can't change the way I get the data which is as follow

    Hrs worked Rate
    05:55:00 £30.00/Hour
    07:40:00 £21.00/Hour
    05:45:00 £30.00/Hour

    What I need to have is 5.92 30.00
    7.67 21.00
    5.75 30.00 ie the time format in decimal and loose all the unnecessary
    symbols etc for the rate

    I'm sure this is probably easy for you clever people but I need help please :-)

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Reformat time data into decimal and remove excess charactors from field

    Hi and welcome to the forum!

    I presume the data that you give there is actually in 2 columns? Are the  characters a formatting error or genuinely part of your data?

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,978

    Re: Reformat time data into decimal and remove excess charactors from field

    Assuming that the hours worked are in A1, paste this into A2: =HOUR(A1)+MINUTE(A1)/60+second(A1)/60/60. Make sure that the cell is formatted as a number.

    If the rate is in B1, paste this into B2: =MID(B1,3,5).

  4. #4
    Registered User
    Join Date
    02-17-2014
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Reformat time data into decimal and remove excess charactors from field

    Hi Thank you for the response.

    Yes they are in two separate fields. The funny A is actually what I get from the export of data from the other program! £30.00/Hour is an exact copy.

  5. #5
    Registered User
    Join Date
    02-17-2014
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Reformat time data into decimal and remove excess charactors from field

    Quote Originally Posted by AliGW View Post
    Assuming that the hours worked are in A1, paste this into A2: =HOUR(A1)+MINUTE(A1)/60+second(A1)/60/60. Make sure that the cell is formatted as a number.

    If the rate is in B1, paste this into B2: =MID(B1,3,5).
    Thats it You are so clever! You can't believe how much time this will save me. Thank you SO much

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,978

    Re: Reformat time data into decimal and remove excess charactors from field

    You are very welcome, Tracie!

  7. #7
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Reformat time data into decimal and remove excess charactors from field

    "=HOUR(A1)+MINUTE(A1)/60+second(A1)/60/60"

    Why not just =24*A1 ?

    Regards

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,978

    Re: Reformat time data into decimal and remove excess charactors from field

    Quote Originally Posted by XOR LX View Post
    Why not just =24*A1?
    Yes, that works, too.

+ 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. Trying to remove excess data around relevant info in one cell
    By syncguy in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-14-2014, 10:33 AM
  2. Replies: 3
    Last Post: 02-25-2013, 11:43 PM
  3. [SOLVED] remove decimal from field, append what was after decimal to before
    By silent122bob in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 05-15-2012, 10:30 PM
  4. Reformat data to remove blanks
    By yunesm in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-21-2011, 12:39 PM
  5. How do you remove excess spaces from an Excel field?
    By sarah_jane in forum Excel General
    Replies: 1
    Last Post: 06-01-2005, 04:05 AM

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