+ Reply to Thread
Results 1 to 2 of 2

Varying Length Raw Data Import - Find Max Week + 1

  1. #1
    Registered User
    Join Date
    10-11-2012
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    45

    Varying Length Raw Data Import - Find Max Week + 1

    Im having a small issue with trying to come up with a solution for some code im trying to run.

    I have attached a file trying to show what i am trying to achieve.

    In summary I have 3 different raw data inputs (Worksheets - Raw Data Business 1:3) that are being read into their respective columns in the worksheet '2015 - Product'. The only rows that i want to copy in the raw data are highlighted 'green' - so no headings nor total row, the 'yellow' column labelled 'week' in the '2015 - Product' i want to add this based on the length of the product.
    eg. for week 31 business 1 has 7 products so i want to repeat the week 31 x7 times, business 2 has 7 products for week 31 again 7 times.

    Where the issue lies is some weeks the product count will vary, so week 32 business 1 may have only 5 products, business 2 has 8 products etc.
    So I just need to add this to my code to accommodate for this.

    Secondly it is the week input, im finding it difficult to work this out (i have a formula in the worksheet to accommodate for it provided it is a fixed length), however id like to incorporate this into my code too, im trying to find the max of the range and then it is +1 for the week, however im struggling to find suitable logic.

    Any help would be greatly appreciated!!
    Attached Files Attached Files
    Last edited by rjnc; 08-05-2015 at 09:56 AM.

  2. #2
    Registered User
    Join Date
    10-11-2012
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    45

    Re: Varying Length Raw Data Import - Find Max Week + 1

    Here is the code that i am trying to rectify for the second last cell selection

    Please Login or Register  to view this content.
    And then i need to not copy the top row which is the heading, but there are issues with the above.

    Secondly the max of the range, this is what i have so far...

    Please Login or Register  to view this content.
    I then need to add this value to the pasted group + 1

    Again any help would be appreciated!

+ 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: 08-15-2014, 08:17 PM
  2. Replies: 12
    Last Post: 11-05-2012, 12:35 PM
  3. Sum varying length blocks of data
    By meetvivek72 in forum Excel General
    Replies: 3
    Last Post: 08-25-2011, 08:47 AM
  4. Sum varying length blocks of data
    By meetvivek72 in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 06-30-2011, 10:01 AM
  5. perform a calculation on subsets of data of varying length
    By smokebreak in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-24-2010, 07:58 AM
  6. Replies: 6
    Last Post: 10-01-2009, 02:50 PM
  7. extracting data from a text string of varying length
    By andy from maine in forum Excel General
    Replies: 4
    Last Post: 03-28-2005, 03:06 PM

Tags for this Thread

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