I have a requirement to let the user of this spreadsheet to select a date or a range of dates and in return to get the sales report that will display the following:
- Product weight sold (LBS),
- Cost to manufacture the product (Cost) and
- Sales amounts.
Please take a look at the spreadsheet attached. It contains two sheets: a “Query1” sheet and a “Report” sheet. The Report sheet looks up the info from the Query1 sheet. The Query1 sheet will be updated daily from a database. The Report sheet contains three tables:
- Daily Analysis,
- Month-To-Date analysis and
- Year-To-Date analysis.
The user needs to input a single date above the “Daily” report and then it needs to input the monthly range of dates above the Month-To-Date report. The same is for the YTD report.
I am looking for a cell formula that will look at the date above (or the Start and End dates) and accordingly find the relevant information within the “Query1” sheet and return it to the appropriate cell on the report.
For a start, I had a success using similar formula:
=IF(ISNA(VLOOKUP("F01",'query1'!$A$2:$E$1000,2,FALSE)),0,VLOOKUP("F01",'query1'!$A$2:$E$1000,2,FALSE))
but I need to inject a nested date or a date range into the formula, which is a challange for me. The values displayed in the “Sample” workbook are the values for your reference only that we should get returned after applying the formula.
Any suggestions would be highly appreciated!
Thank you,
Peter
Bookmarks