Link to home
Start Free TrialLog in
Avatar of Edward Pamias
Edward PamiasFlag for United States of America

asked on

How do I pull the last 8 weeks of a table in excel 2010

I have a table that I manually drop 1 column of data a week into. I need to pull the last  8 weeks of data and graph it. Keep in mind this table has the whole year of data in it. At the top of the columns it has the week ending dates (for example July 3rd) as the titles.
Avatar of aikimark
aikimark
Flag of United States of America image

Do you know how to do this manually?  If so, have you done this?
You can know the last date using the MAX() function
You can find the column number of this last date with the help of the MATCH() function
Subtract 7 from that column number to get the column number of the first of the eight weeks
Use the offset formula to return the desired 8 column data
Avatar of Edward Pamias

ASKER

The other question I asked is for raw data that is pulled from a ticketing system. This table is manually created and what I do is copy one column at a time to the table and manually add the week ending dates to the top of the column.
Alongside your growing data create another dataset with only eight columns.

Column 8 (assuming AF) of that set will be the following formula:

=MAX($A$1:$AA$1)

Where AA is the column AFTER your existing last column.

Columns 7 to 1 will be:
=AF1-7

copied left, the reference to AF will reduce.

As you need new columns in your source data, insert a column before entering the data, this will push everything to the right one column but the references will change. You can then use the new table of 8 columns for your graph.

If that doesn't make sense, upload a sample file on which to demonstrate.

Thanks
Rob H
Alternatively, put your 8 column set to the left of the source data or on a separate sheet.

If to the left of the source data, the MAX function can refer to virtually the whole row or 52 columns ie one for each week eg K:BJ (columns A to H for the copy set and a couple of spare columns before the source data starts in K.

If on another sheet, the MAX can refer to the whole row if so required but if you only have 1 years worth of data it can be 52 columns, ie A:AZ

For both of these you don't have to insert columns, you can just paste in the new data on the right hand side of the existing and add the date in row 1.

Thanks
Rob H
Here is a sample file.... I tried what you said but it did not work for me....
samplesheet7615.xlsx
ASKER CERTIFIED SOLUTION
Avatar of Rob Henson
Rob Henson
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you... I appreciate all the options given.