I am not great with Excel and I am trying to select a specific row of data based on a predefined cell value.
I am trying to query a daily data file so I can populate an overview page for quick data mining. The user will select the reporting Year and week by entering a value into a cell, and this will then return the relevant data for that week, which will then be broken down.
If I was running an SQL query it would look something like:
SELECT * from sales
were Period = 'Yr:2012 Wk:051'
End
Assuming you have a Period column in which each period occurs only once, you could retrieve the sales value with a
VLOOKUPformula (In case the Period is after Sales column, useINDEX/MATCHinstead, see here for details.)However, if you have multiple rows with that period, you can either aggregate the sales for the period using
SUMIFS– or you aggregate the whole sales with a pivot table (putting the period in the category and the sales in the value field) and use aGETPIVOTDATAformula. To easily construct the GETPIVOTDATA formula, just start typing = and the select any value cell from the pivot table. Excel will populate the formula and you only need to replace the parameter for the period…