+ Reply to Thread
Results 1 to 18 of 18

Convert formatting from time to number

  1. #1
    Registered User
    Join Date
    01-30-2013
    Location
    Australia
    MS-Off Ver
    16.36 Office 365
    Posts
    13

    Convert formatting from time to number

    I export stock from our POS system into a CSV. Each row is a stock item. It lists into one column the following example 1:1 3:2 4:1 which basically means store one has one item, store 3 has 2 items, etc. I move them out by using text to columns and then cut and paste into a column per store. I know very tedious. Anyway when I want to remove the store prefix (ie 1 to only show the quantity excel keeps formatting as time, which then creates other issues.
    I just need a column heading of store number then the quantity listed below
    I tried replace, changing formatting and I converted to .xlxs with no luck
    Thanks
    Attached Files Attached Files

  2. #2
    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,883

    Re: Convert formatting from time to number

    Which version of Excel are you using?
    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.

  3. #3
    Registered User
    Join Date
    01-30-2013
    Location
    Australia
    MS-Off Ver
    16.36 Office 365
    Posts
    13

    Re: Convert formatting from time to number

    Version 16.36 its on Office 365 account

  4. #4
    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,883

    Re: Convert formatting from time to number

    Thanks. Please update your forum profile accordingly.

  5. #5
    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,883

    Re: Convert formatting from time to number

    Are you able to attach thee .csv file? It might best be imported using PowerQuery.

  6. #6
    Registered User
    Join Date
    01-30-2013
    Location
    Australia
    MS-Off Ver
    16.36 Office 365
    Posts
    13

    Re: Convert formatting from time to number

    I have done both thanks
    Attached Files Attached Files

  7. #7
    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,883

    Re: Convert formatting from time to number

    Here's the M Code I used to produce the attached (all easy steps via the PowerQuery UI):

    Please Login or Register  to view this content.
    You will need to change the bit in red so that the file can refresh from your own data source location.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    01-30-2013
    Location
    Australia
    MS-Off Ver
    16.36 Office 365
    Posts
    13

    Re: Convert formatting from time to number

    Sorry I am really a novice at this level. PowerQuery is a separate application? And then M Code is for Marco's? Or am I better just getting PQ and using that
    I will have to do this a fair bit from now on

  9. #9
    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,883

    Re: Convert formatting from time to number

    PowerQuery (or Get & Transform) is on the Data ribbon in Excel 365 (it's already built in)

    Use the From CSV icon and navigate to the .csv file location. When the import dialog appears, click the Transform button and the data will be loaded into the PQ editor.

    Open the Advanced Editor from the ribbon and make a note of the source file path, then overwrite everything in that window with the code above. Now edit the file path appropriately.

    Finally click on Close & Load on the left of the main ribbon.

    All done!

  10. #10
    Registered User
    Join Date
    01-30-2013
    Location
    Australia
    MS-Off Ver
    16.36 Office 365
    Posts
    13

    Re: Convert formatting from time to number

    Ok sounds good. Thanks so much for your help

  11. #11
    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,883

    Re: Convert formatting from time to number

    Have a go - lt me know how you get on.

  12. #12
    Registered User
    Join Date
    01-30-2013
    Location
    Australia
    MS-Off Ver
    16.36 Office 365
    Posts
    13

    Re: Convert formatting from time to number

    Excel capture 2.JPGExcel capture 1.JPG

    Well not that great! I used the same csv file. Hope the screen shots show up otherwise I will add as attachments

  13. #13
    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,883

    Re: Convert formatting from time to number

    You should add as a workbook, please. Looks like you've messed up one of the steps. Attach the WB and I'll have a look at lunchtime.
    Last edited by AliGW; 05-12-2020 at 11:06 AM.

  14. #14
    Registered User
    Join Date
    01-30-2013
    Location
    Australia
    MS-Off Ver
    16.36 Office 365
    Posts
    13

    Re: Convert formatting from time to number

    Thanks. I did try a few times.
    Attached Files Attached Files

  15. #15
    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,883

    Re: Convert formatting from time to number

    Try this version:

    Please Login or Register  to view this content.
    Remember to adjust the file path.
    Attached Files Attached Files

  16. #16
    Registered User
    Join Date
    01-30-2013
    Location
    Australia
    MS-Off Ver
    16.36 Office 365
    Posts
    13

    Re: Convert formatting from time to number

    Wow that worked fine, thanks.

    Looking at your 'script' I have to name the column headers the same in a future spreadsheets for this to work on another.
    Very excited about this. Going to make things much easier

    Thanks

  17. #17
    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,883

    Re: Convert formatting from time to number

    If you step through each step on the right, you will be able to see how to build up the solution. Everything is done using clicks in the UI - no coding per se (as it's generated for you on the fly). PQ is a great tool to have in your kit.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  18. #18
    Registered User
    Join Date
    01-30-2013
    Location
    Australia
    MS-Off Ver
    16.36 Office 365
    Posts
    13

    Re: Convert formatting from time to number

    Thanks again

+ 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. [SOLVED] Convert from time to number
    By Saturn in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-31-2016, 09:42 AM
  2. Convert time to decimal value by formatting?
    By trstew in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 08-07-2016, 08:35 AM
  3. [SOLVED] convert decimal number to time : convert 1,59 (minutes, dec) to m
    By agenda9533 in forum Excel General
    Replies: 22
    Last Post: 09-15-2013, 10:43 AM
  4. [SOLVED] How to convert Time to number
    By Master Foo in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-08-2013, 06:03 PM
  5. Convert time to number
    By DavidBW in forum Excel General
    Replies: 2
    Last Post: 11-08-2011, 01:39 PM
  6. Convert:Number formatting
    By Yessen in forum Excel General
    Replies: 2
    Last Post: 04-08-2010, 10:13 AM
  7. Convert Number To Time
    By jtf in forum Excel General
    Replies: 2
    Last Post: 08-07-2008, 03:18 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