+ Reply to Thread
Results 1 to 3 of 3

How to change data structure by month #'s

  1. #1
    Forum Contributor
    Join Date
    09-30-2015
    Location
    LA my baby
    MS-Off Ver
    2013
    Posts
    727

    How to change data structure by month #'s

    Hello. This might be a complicated task that might need vba but maybe could be settled by a formula as well. I have sets in my rows and months in my columns. I would like to reformat the data content so that it's set up in month #'s. The first month is the first month with a % in it. So, for January in the attached sheet. The first month is the %'s from 2014 January (because that is the first month that has information for that data set) Is there a way that I can do this with code or formulas? My real data set is much larger.
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    09-30-2015
    Location
    LA my baby
    MS-Off Ver
    2013
    Posts
    727

    Re: How to change data structure by month #'s

    Another way of stating this, is that if there are 0's to the left of the data, pull the data from the right over those 0%s.

  3. #3
    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
    52,939

    Re: How to change data structure by month #'s

    Actually, for Jan, the 1st column with a value in, is Nov 2013 (.0285...%), not Jan 2014

    Put this ARRAY formula in B19 and copy down and across as needed...
    =INDEX($B3:$AC3,SMALL(IF($B$3:$AC$3>0,COLUMN($B$3:$AC$3)-1),COLUMNS($A$1:A1)))
    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.

    If you want to start at something higher than 0, adjust the 0 (bolded) in my formula as needed (or, you could put that in it's own cell and reference it)
    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

+ 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. Replies: 6
    Last Post: 09-04-2015, 08:20 PM
  2. Prevent structure of a range to change when row is inserted
    By nickmax1 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 02-05-2015, 12:37 PM
  3. Creating a Pyramid Hierarchy structure from a flat structure
    By thegamerulez in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-16-2014, 01:28 AM
  4. need data to change from month to month
    By dmoore6 in forum Excel General
    Replies: 2
    Last Post: 07-31-2012, 01:37 PM
  5. VBA to change structure of excel file
    By Jedgroev in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-21-2012, 09:13 AM
  6. "convert" data with logfile structure to spreadsheet structure
    By boarders paradise in forum Excel General
    Replies: 7
    Last Post: 01-10-2011, 02:06 AM
  7. Replies: 1
    Last Post: 09-07-2010, 01:15 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