+ Reply to Thread
Results 1 to 4 of 4

Pull data (last 100 days) from one sheet to another and transpose it (OFFSET & COUNT??)

Hybrid View

  1. #1
    Registered User
    Join Date
    07-24-2015
    Location
    San Jose, Costa Rica
    MS-Off Ver
    2013
    Posts
    15

    Pull data (last 100 days) from one sheet to another and transpose it (OFFSET & COUNT??)

    Dear Excel Friends,

    I was hoping someone could help me pull data from one sheet to another and just pull the last 100 workdays (trading) of data on an ongoing basis. Also I would like to transpose the data.

    Please let me explain the exact details.

    I manually update a sheet which I call "source data" daily (adding a row) with the closing prices of a futures exchange.

    But I would like to automatically move the last 100 days of data from the ¨Source data sheet" to another sheet (CalWorksheet) transposing the date and data.

    Attached are the two worksheets with the data and template.

    Please let me know if you need more information or explantion.

    Many Thanks!

    PS I added the most recent US holiday dates that fall within the last 100 working days
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Pull data (last 100 days) from one sheet to another and transpose it (OFFSET & COUNT??

    It should be fairly simple to pull the last 100 days. However, looking at your example on CalWorksheet, I am not sure what you are representing on each row (under ED Generic and DATES)? Do you want what is in Row 1 (Source) to be moved to column A and what is in Row 2 (Source) to be moved to column B?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    07-24-2015
    Location
    San Jose, Costa Rica
    MS-Off Ver
    2013
    Posts
    15

    Re: Pull data (last 100 days) from one sheet to another and transpose it (OFFSET & COUNT??

    I like simple...Please ignore the ED generic text it just a numbering sequence.

    I want what is in row 177(source) to be moved to column C(CalWorksheet) actually cell C7 etc.

    Please remember that I add a new row daily to source data so I want this row always to be in cell C7 (CalWorksheet)

    I updated the spreadsheet with an example.

    Thanks!

    Please let me know if you need further clarification
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Pull data (last 100 days) from one sheet to another and transpose it (OFFSET & COUNT??

    First, need to get your source data into dynamic ranges so when you add rows or columns, the defined name changes. I created the following Defined names

    RowCt = =MATCH(9E+99, 'Source Data'!$A$4:$A$5000) (assumes you will never have more than 5000 rows of data)

    AllDates ='Source Data'!$A$4:INDEX('Source Data'!$A$4:$A$5000, MATCH(9E+99, 'Source Data'!$A$4:$A$5000))

    DataSet ='Source Data'!$B$4:INDEX('Source Data'!$B$4:$ZZ$5000, RowCt, MATCH("zzzz", 'Source Data'!$B$2:$ZZ$2))

    Then in CalWorksheet cell C7 copied across

    =INDEX(AllDates, RowCt-COLUMNS($C$7:C$7)+1)

    In C8 copied down and across

    =INDEX(DataSet, RowCt-COLUMNS($C$7:C$7)+1, ROWS($C$7:$C7))
    See example
    Attached Files Attached Files

+ 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: 1
    Last Post: 03-20-2016, 10:52 PM
  2. Replies: 13
    Last Post: 06-14-2014, 03:47 AM
  3. [SOLVED] How to copy data range form one sheet to other sheet with desire Reverse Transpose ?
    By nur2544 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-18-2013, 12:30 PM
  4. Replies: 0
    Last Post: 05-21-2013, 03:09 PM
  5. Replies: 4
    Last Post: 03-08-2013, 09:49 AM
  6. Need a macro to count certain days Sun, Tues, Thurs for a gym membership sheet
    By barnoonan in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-18-2011, 07:32 AM
  7. Macro: Count rows in sheet A, copy count in sheet B, paste offset in sheet A
    By Agent:Orange in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-19-2011, 07:56 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