Date Ranges and Pulling Data

Copper Contributor

Using Office 365 on an MS Surface device.

 

I am trying to create a spreadsheet where I can enter daily data for various items (sales, quantity, price, etc.).  This data is in a separate worksheet and is populated every day for the year.  So, I have a row with dates and underneath, rows with all the data I am tracking for each date:

                       Jan 1        Jan 2          Jan 3     etc...

Quantity          100          110           120

Price                  $1              $1           $2

Sales                $100        $110         $240

 

I then have a separate worksheet where I create daily, weekly, monthly, quarterly reports.  What I want to be able to do is set a date range on the report worksheet (for example, Jan 1 to Jan 3) and have the report populate the data from the data sheet:

 

Date range: Jan 1 - Jan 3

Quantity: 330

Sales: $450

 

I imagine there is a simple formula for this...I have been using a massive series of "IF" statements and my spreadsheet is getting unstable...and too hard to fix/edit/use...

 

Anyone have any thoughts?

 

1 Reply

@ggjer 

I'd suggest you to reconsider the data structuring, more exactly use table as

               Quantity  Price Sales

Jan 1        100          $1      

Jan 2        110          $1

Jan 3         120          $2

...

Sales will be calculated. Same with other fields. With that you may build reports using PivotTable or formulas relatively easy. Otherwise that's not simple task and in any case you need to do such transformation in background to generate reports.

 

For already existing data that's one time job to transpose the data, could be done by formula or Power Query. In any case it's better if you provide sample file, otherwise someone shall make some guesses and assumptions (e.g. Jan 1 is text or date formatted as this), build the model and play with formulas. Without the file much less chances to have an answer plus assumptions could be wrong.