+ Reply to Thread
Results 1 to 5 of 5

Looping through worksheets, columns and rows

  1. #1
    Registered User
    Join Date
    03-31-2009
    Location
    Carmoo, Australia
    MS-Off Ver
    Excel 2000
    Posts
    18

    Looping through worksheets, columns and rows

    I have rainfall data going back 17 years,
    with one year per worksheet, labelled with "year",
    one month per column, labelled with "Month"
    one day per row, labelled with day-number (empty if invalid day).

    I want to do some analysis looking at consecutive runs of days,
    so the current layout is not helpful.
    I think I want to convert the data to (17*12*31) x 2: year-month-day, rainfall

    I don't need the complete working solution, just a hint on the best way to go.
    (preferably not with VB)
    Last edited by DaveKimble; 08-30-2014 at 11:48 PM.

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Looping through worksheets, columns and rows

    http://www.excelforum.com/the-water-...-question.html
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Looping through worksheets, columns and rows

    Convert the dates in one column so that you have Year, Month, and Day as real dates. Do this for every worksheet. Then use the Pivot Table wizard, Choose Multiple Consolidation Ranges to compile your data into one Pivot Table.

    Having done that you can now group by year, month or day or even number of days to produce various reports.

    Another approach would be to combine all your worksheets into one worksheet and convert your dates to real dates then create a Pivot Table and group by date the Years, Months and Days as required.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  4. #4
    Registered User
    Join Date
    03-31-2009
    Location
    Carmoo, Australia
    MS-Off Ver
    Excel 2000
    Posts
    18

    Re: Looping through worksheets, columns and rows

    Thanks for that.
    My quick and dirty solution has been to combine all the worksheets into one and save that as a .csv, then read that in with PHP and process it to another .csv, and finally read that back with Excel. - well I did say dirty.

  5. #5
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Looping through worksheets, columns and rows

    Reading your post #4.

    You are on an excel forum.

    The data are not stored in an excel file?

+ 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. Help Looping Through Excel Columns & Rows
    By Mark123456789 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-25-2013, 07:44 PM
  2. Looping Through Columns And Rows
    By slimjm911 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-08-2012, 08:41 PM
  3. Looping Through All Worksheets and Hiding Rows
    By d0uble3m in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-08-2011, 08:50 AM
  4. Looping through rows and columns at the same time
    By omgeokid in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-04-2011, 12:02 PM
  5. [SOLVED] Looping through Columns then Rows
    By JCP in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-30-2005, 12:27 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