+ Reply to Thread
Results 1 to 13 of 13

Adding blank rows to satisfy hourly data format

  1. #1
    Registered User
    Join Date
    12-23-2015
    Location
    North Carolina, USA
    MS-Off Ver
    2013
    Posts
    8

    Adding blank rows to satisfy hourly data format

    I am compiling hourly data but one of my sources only collects it for the hours of 3 to 20. I need it to include the hours of 0 to 23. (Rows for the hours of 0, 1, 2, 21, 22, 23 would need to be added just with nil in the data column) How do I get it into this format without having to manually add extra rows or copy each group into a pre-existing sheet?

    Here is an example:

    Correct format:
    DATA YEAR MONTH DAY HOUR
    555 2014 1 1 0
    555 2014 1 1 1
    555 2014 1 1 2
    555 2014 1 1 3
    555 2014 1 1 4
    555 2014 1 1 5
    555 2014 1 1 6
    555 2014 1 1 7
    555 2014 1 1 8
    555 2014 1 1 9
    555 2014 1 1 10
    555 2014 1 1 11
    555 2014 1 1 12
    555 2014 1 1 13
    555 2014 1 1 14
    555 2014 1 1 15
    555 2014 1 1 16
    555 2014 1 1 17
    555 2014 1 1 18
    555 2014 1 1 19
    555 2014 1 1 20
    555 2014 1 1 21
    555 2014 1 1 22
    555 2014 1 1 23

    CURRENT FORMAT:

    DATAYEAR MONTH DAY HOUR
    555 2014 1 1 3
    555 2014 1 1 4
    555 2014 1 1 5
    555 2014 1 1 6
    555 2014 1 1 7
    555 2014 1 1 8
    555 2014 1 1 9
    555 2014 1 1 10
    555 2014 1 1 11
    555 2014 1 1 12
    555 2014 1 1 13
    555 2014 1 1 14
    555 2014 1 1 15
    555 2014 1 1 16
    555 2014 1 1 17
    555 2014 1 1 18
    555 2014 1 1 19
    555 2014 1 1 20

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,050

    Re: Adding blank rows to satisfy hourly data format

    Hi, welcome to the forum

    Can you upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    12-23-2015
    Location
    North Carolina, USA
    MS-Off Ver
    2013
    Posts
    8

    Re: Adding blank rows to satisfy hourly data format

    There are two tabs in this attachment. The one stating 'help' is the one with only hours 3 to 20. The other tab is the version I need with all hours 0 through 23
    Attached Files Attached Files

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,050

    Re: Adding blank rows to satisfy hourly data format

    where does this data come from, and how are you pulling it in?

  5. #5
    Registered User
    Join Date
    12-23-2015
    Location
    North Carolina, USA
    MS-Off Ver
    2013
    Posts
    8

    Re: Adding blank rows to satisfy hourly data format

    Environmental data. I can't change the accessible format or the way I source it.

  6. #6
    Valued Forum Contributor
    Join Date
    12-28-2014
    Location
    NSW, Australia
    MS-Off Ver
    MS365
    Posts
    606

    Re: Adding blank rows to satisfy hourly data format

    I think I have it sorted, but like FDibbins said "where does this data come from, and how are you pulling it in?"

    The Help sheet has the rows missing for certain hours, and Correct has all hours.
    But Help seems to have missing data (as in Quality and Version is the same).
    Also both sheets have different columns after the hour column.

    If you could supply a data sheet (only need a few lines) that shows exactly how the data is once imported into excel, that would help immensely.

  7. #7
    Registered User
    Join Date
    12-23-2015
    Location
    North Carolina, USA
    MS-Off Ver
    2013
    Posts
    8

    Re: Adding blank rows to satisfy hourly data format

    Excel Help.xlsx

    Hello Beamernsw. (new attachment above)

    Thanks so much for your help.

    Yes, what I need is for the data columns in the 'help' sheet to be aligned with the hours in the 'correct' sheet. Basically, the missing hours would just be blank lines and I would have both aligned. In the end, what I want is to have a 'master sheet' with all my variables side-by-side in columns in the according hours. So, columns F, G, and H in the 'help' sheet would be in the appropriate rows of the sheet with all hours. I have attached an updated sheet as well.

    The only difference between this sheet and the original file is spacing. I could, however, provide the file that reports the 'date' as one column in the format year, month, day, hour as one number e.g., 2014082305

  8. #8
    Registered User
    Join Date
    12-23-2015
    Location
    North Carolina, USA
    MS-Off Ver
    2013
    Posts
    8

    Re: Adding blank rows to satisfy hourly data format

    This file may help as well.

    What I need is for the data in the 'limited hours' tab to be aligned with the 'date' column in the 'full hours' tab. Of course doing this manually by adding rows and then copy-paste would be quite difficult.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    12-23-2015
    Location
    North Carolina, USA
    MS-Off Ver
    2013
    Posts
    8

    Re: Adding blank rows to satisfy hourly data format

    Am I correct to assume that the vlookup function can be used to create a new table aligned like I want? It's not working for me but it seems that it would be a way to do this??

  10. #10
    Valued Forum Contributor
    Join Date
    12-28-2014
    Location
    NSW, Australia
    MS-Off Ver
    MS365
    Posts
    606

    Re: Adding blank rows to satisfy hourly data format

    I can do any of that.....I'm just not sure which sheet is your original data...
    The Level of quality and version is different between sheets.
    The Help sheet has a minutes column but only partial hours
    The Correct sheet has a data point and percent column as well as all hours listed
    The limited hours sheet has date/time as 2014010103 format, which is fine.

    All I need to know is where this master sheet will grab all these different columns of data from.
    Will they be in 2 sheet from 1 book and 1 sheet from another book like now?

    Sorry to sound confusing....I just don't know which sheet I'm working from to make this master sheet.
    If all your data comes in on one sheet, could you please just submit the sheet with only a few rows on it?

  11. #11
    Registered User
    Join Date
    12-23-2015
    Location
    North Carolina, USA
    MS-Off Ver
    2013
    Posts
    8

    Re: Adding blank rows to satisfy hourly data format

    Yes, thank you very much!

    Hopefully I can clarify since I have provided two files:

    The sheet above: 'excel help 2':

    The tab 'limited hours' is the original file. The tab 'full hours' shows the dates I need the data from 'limited hours' to fit into.

    The data are on several sheets so once I can get the 'limited hours' to fit the 'full hours' format I will be able to finish the formatting of my new file I am creating.

    Thanks again, I appreciate your help!

  12. #12
    Valued Forum Contributor
    Join Date
    12-28-2014
    Location
    NSW, Australia
    MS-Off Ver
    MS365
    Posts
    606

    Re: Adding blank rows to satisfy hourly data format

    Still not totally clear
    But this might be all you need to get you going.

    All data on Beamer's sheet is coming from the LIMITED HOURS sheet except Data Point, Percent, and eor which are grabbed from the Correct sheet.

    The first file was too large (2.50mb)
    So I deleted the sheets I wasn't using. Didn't help a lot.
    I had the formulas copied down 10,000 lines.....that's now 100 lines
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    12-23-2015
    Location
    North Carolina, USA
    MS-Off Ver
    2013
    Posts
    8

    Re: Adding blank rows to satisfy hourly data format

    Amazing job! I really appreciate your help, I should be good to go now!!

    Happy new year Beamer!!

+ 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. average from (58 rows)or from 29 first day hourly data of every mounth
    By fakhteh in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-11-2015, 02:16 PM
  2. Web Query - Adding blank rows with new data
    By Garydam in forum Excel General
    Replies: 0
    Last Post: 01-06-2015, 11:27 AM
  3. How do I add a number from each Hourly data to 1/4 hourly about 8,000 times?
    By Louis59 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-26-2014, 01:02 AM
  4. Adding blank rows per current row with data
    By ryanaskren in forum Excel General
    Replies: 1
    Last Post: 08-28-2014, 12:36 PM
  5. Plotting Half Hourly Data in Weekly/Month Format
    By craigj21 in forum Excel Charting & Pivots
    Replies: 6
    Last Post: 09-06-2013, 09:43 AM
  6. Macro to format data - counting and adding additional rows on condition
    By rynofrowan in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-12-2013, 11:46 PM
  7. adding a new row to end of data set (specify # of rows, keep the format)
    By missmr28 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-29-2013, 06:22 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