My advice is, design your workbook more database-like. E.g.:
A sheet where all goods are registered in table like
GoodsCode, GoodsName
and define the datarange in column GoodsCode as dynamic named range (all dynamic named ranges mentioned are meant to use as sources for Data Validation lists in other tables);
A sheet where all good types are registered in a table like
GoodsType
with values like "Adult", "Youth", etc., and the datarange is defined as dynamic named range;
A sheet where all goods types and sizes are registered in goods registry table like
GoodsID, GoodsCode, GoodsType, GoodsSize, GoodsPrice
where in columns GoodsCode and GoodsType cells are defined as Data Validation List, to allow select there only goods codes registered in goods table and goods types table respectively, and the column GoodsCodeAndSize is a hidden calculated column, combined from CoodsCode, GoodsType, and GoodsSize values in same row (e.g. "Hood/Adult/XS-XL"), and again defined as Dynamic Named Range;
A sheet, where all members are registered in a table like
Member
, defined a Dynamic Named range;
All above are lookup tables, which you need to update only, when you need to add new members, or goods.
And then the data input table, like
OrderDate, Member, GoodsID, Quantity, UnitPrice, Amount
where UnitPrice is read from goods tegistry table, and Amounts is calculated as Quantity*UnitPrice.
My advice is also to define all those tables as Defined Tables, so all formulas, data validation llist, etc., are updated automatically, whenever a new row is added to table, and the filtering is added by default to all defined tables too. And it will be easy to define any column of defined table as dynamic range too.
Lock headers of all tables, so they will be always visible.
On input sheet, leave at least 2 empty rows at top of page, and into 1st row there enter the subtotal formulas to calculate the sum for filtered values in column where Amount is calculated.
The simples way to get any totals will be to set filters for input table (for OrderDate and Member columns), and the subtotal formula at top of sheet returns the wanted result.
When you want the report in table form, design a report sheet, where you at top of sheet determine e.g. order date, and in table below is displayed a summary for all members gaving ordered any goods in this order. But design of such report will be much more complicated for current post.
|