-
1
- #1
I frequently use the database "@functions" in Lotus 123 Release 5 to extract and analize tabular data my spreadsheets. I have tried to use the corresponding database functions in Excel versions up to and including XP with great difficulty. The main difference seems to be in the way the criterion is specified. In the old Lotus version, I can write the criteria directly in the function call whaeras in Excel I need to reference a range for the criteria. This may seem like a small difference, but I have been unable to create useful columns of these database function calls in Excel. For example:
Suppose I have a table named "TABLE1" (Table at bottom of post) that goes on with much more data. In Lotus, I can write a formula in cell A1 like:
@dsum($TABLE1,D1,COUNTRY=B1#AND#YEAR=C1)
Where D1 is the string "SALES", B1 and C1 might be other formulas whose results are "England" and "1999". In Excel, I can write a similar formula
=DSUM(TABLE1,"SALES",M5:N6)
but I have to reference a formatted, multirow range (M5:N6) for the criteria. This makes it very difficult to create a column of function calls that refer to criteria in corresponding columns.
I admit that I don't understand Excel pivot tables as well as I should, but I don't think I want a pivot table. I want a column of formulae that reference other specific columns for criteria that are determined by me, not by the pivot table. I hope someone out there can tell me that there is a way to do this in Excel.
TABLE1
DIV COUNTRY YEAR PRODUCT MARKET SALES
--- ------- ---- ------- ------ -----
Atlanta USA 1999 Nuts Aerospace 68.96
Chicago USA 1999 Nuts Aerospace 51.73
London England 1999 Nuts Aerospace 42.58
New Yor USA 1999 Nuts Aerospace 67.94
Atlanta USA 1999 Nuts Automotive 85.78
Chicago USA 1999 Nuts Automotive 52.87
London England 1999 Nuts Automotive 67.84
New Yor USA 1999 Nuts Automotive 72.74
Atlanta USA 1999 Bolts Aerospace 53.63
Chicago USA 1999 Bolts Aerospace 12.22
London England 1999 Bolts Aerospace 37.74
New Yor USA 1999 Bolts Aerospace 61.74
Atlanta USA 1999 Bolts Automotive 71.13
Chicago USA 1999 Bolts Automotive 43.86
London England 1999 Bolts Automotive 83.72
New Yor USA 1999 Bolts Automotive 10.84
Suppose I have a table named "TABLE1" (Table at bottom of post) that goes on with much more data. In Lotus, I can write a formula in cell A1 like:
@dsum($TABLE1,D1,COUNTRY=B1#AND#YEAR=C1)
Where D1 is the string "SALES", B1 and C1 might be other formulas whose results are "England" and "1999". In Excel, I can write a similar formula
=DSUM(TABLE1,"SALES",M5:N6)
but I have to reference a formatted, multirow range (M5:N6) for the criteria. This makes it very difficult to create a column of function calls that refer to criteria in corresponding columns.
I admit that I don't understand Excel pivot tables as well as I should, but I don't think I want a pivot table. I want a column of formulae that reference other specific columns for criteria that are determined by me, not by the pivot table. I hope someone out there can tell me that there is a way to do this in Excel.
TABLE1
DIV COUNTRY YEAR PRODUCT MARKET SALES
--- ------- ---- ------- ------ -----
Atlanta USA 1999 Nuts Aerospace 68.96
Chicago USA 1999 Nuts Aerospace 51.73
London England 1999 Nuts Aerospace 42.58
New Yor USA 1999 Nuts Aerospace 67.94
Atlanta USA 1999 Nuts Automotive 85.78
Chicago USA 1999 Nuts Automotive 52.87
London England 1999 Nuts Automotive 67.84
New Yor USA 1999 Nuts Automotive 72.74
Atlanta USA 1999 Bolts Aerospace 53.63
Chicago USA 1999 Bolts Aerospace 12.22
London England 1999 Bolts Aerospace 37.74
New Yor USA 1999 Bolts Aerospace 61.74
Atlanta USA 1999 Bolts Automotive 71.13
Chicago USA 1999 Bolts Automotive 43.86
London England 1999 Bolts Automotive 83.72
New Yor USA 1999 Bolts Automotive 10.84