+ Reply to Thread
Results 1 to 7 of 7

Convert time planning to single line

  1. #1
    Registered User
    Join Date
    06-04-2020
    Location
    brussels Belgium
    MS-Off Ver
    365
    Posts
    3

    Convert time planning to single line

    Hello,

    I have a planning file that is filled in by the different departments, that i need to convert to a .csv file to be able to upload it to our payroll system.

    The planning sheet looks like the tab data and in the result tab you can see how the .csv file needs to look.

    Anybody that can help me with a macro or another way to make this conversion?

    Thanks & regards

    Luk
    Attached Files Attached Files

  2. #2
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,712

    Re: Convert time planning to single line

    Hello Hemmerl & welcome to the forum,

    Try the below code. This will insert a new sheet with the expected results, if you wish the output in a certain sheet, let me know to amend

    Please Login or Register  to view this content.
    If I was able to help, you can thank me by clicking the * Add Reputation under my user name

  3. #3
    Registered User
    Join Date
    06-04-2020
    Location
    brussels Belgium
    MS-Off Ver
    365
    Posts
    3

    Re: Convert time planning to single line

    Hello nankw83, and thak you for the help and the fast reply.

    I tried your code, and this is the output i get:
    pn date code
    1 04/05/2020 a
    1 05/05/2020 c
    1 d b
    2 04/05/2020 b
    2 05/05/2020 b
    2 d c
    3 04/05/2020 c
    3 05/05/2020 a
    3 d d
    4 04/05/2020 a
    4 05/05/2020 d
    4 d a
    5 04/05/2020 d
    5 05/05/2020 a
    5 d b


    So almost there. 1 more question, as you can imagine, my original file is a lot bigger, how do i need to adapt the code to take into account for the longer ranges? (about 2300 people, and a planning for several months.

    Thank you very much in advance for your help, as i really am not good with VBA

    kind regards

    Luk

  4. #4
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,712

    Re: Convert time planning to single line

    The code should work in any range. In your sample file sheet "data" cell D1, this should be 6-May & it's a typo as d or this is intentional ?

  5. #5
    Valued Forum Contributor Eastw00d's Avatar
    Join Date
    02-29-2020
    Location
    Breda, NL
    MS-Off Ver
    2016, 2019
    Posts
    833

    Re: Convert time planning to single line

    Hi Hemmerl,
    you get this, because D1 in Sheet Data = "d".

    Cheers
    Erwin
    I started learning VBA because I was lazy ...
    Still developing.... being more lazy...

  6. #6
    Registered User
    Join Date
    06-04-2020
    Location
    brussels Belgium
    MS-Off Ver
    365
    Posts
    3

    Re: Convert time planning to single line

    Hi All,

    Indeed it was a typo in my file.

    Thank you very much for the help, the code works perfectly, you saved me days of manual work.

    Cheers
    Luk

  7. #7
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,712

    Re: Convert time planning to single line

    Glad to help & you are welcome


    If the provided solution takes care of the original question, please mark the thread as 'SOLVED' from the Thread Tools menu at top of the page & consider adding reputation(s) to those who have help by clicking the star under their usernames

+ 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. Having trouble with line graphs displaing a single continuous data line.
    By Le_epic_plague_dr in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 02-09-2018, 10:44 AM
  2. [SOLVED] convert a time in minutes to a single digit
    By bzl in forum Excel General
    Replies: 5
    Last Post: 11-18-2015, 06:30 AM
  3. [SOLVED] I want to convert single line data to multiple raws
    By niornss in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 10-26-2015, 05:32 AM
  4. Making a time planning schedule
    By ImNoTree in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-16-2013, 01:48 PM
  5. [SOLVED] how to convert single line data format to multiple line data format
    By pksreela in forum Excel General
    Replies: 3
    Last Post: 10-16-2012, 08:13 AM
  6. Convert multi-line records to single line?
    By automator in forum Excel - New Users/Basics
    Replies: 10
    Last Post: 06-07-2010, 09:46 AM
  7. convert excel data into a time line bar graph
    By excelforum2009 in forum Excel General
    Replies: 1
    Last Post: 06-25-2009, 06:34 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