G
Guest
I am trying to convert at old Lotus 123 spreadsheet to Excel. It is full of DSUM functions that fail because the old 123 criteria do not work. In the 123 method, I could specify criteria as
@dsum($datarange,"sales",region=B2
This would basically sum the "sales" column in datarange where the "region" column was equal to the value in cell B2. It looks like Excel can't handle this because the criteria must now be a range (though it looks like DSUM in access works like 123 did?) but I found the example and notes below under "criteria examples" in the Excel help on DSUM. I tried to figure out how to use it but I do not understand what it means (can't get it to work anyway). Can anyone translate what this means and whether this could solve my problem? I trying to avoid changing the many DSUMs to SUMIFs. Here is the snippet from the online help on criteria examples:
Conditions created as the result of a formul
You can use a calculated value that is the result of a formula as your criterion. When you use a formula to create a criterion, do not use a column label for a criteria label; either keep the criteria label blank or use a label that is not a column label in the list. For example, the following criteria range displays rows that have a value in column C greater than the average of cells C7:C10
=C7>AVERAGE($C$7:$C$10)
Note
The formula you use for a condition must use a relative reference to refer to the column label (for example, Sales) or the corresponding field in the first record. All other references in the formula must be absolute references, and the formula must evaluate to TRUE or FALSE. In the formula example, "C7" refers to the field (column C) for the first record (row 7) of the list
You can use a column label in the formula instead of a relative cell reference or a range name. When Microsoft Excel displays an error value such as #NAME? or #VALUE! in the cell that contains the criterion, you can ignore this error because it does not affect how the list is filtered
When evaluating data, Microsoft Excel does not distinguish between uppercase and lowercase characters
@dsum($datarange,"sales",region=B2
This would basically sum the "sales" column in datarange where the "region" column was equal to the value in cell B2. It looks like Excel can't handle this because the criteria must now be a range (though it looks like DSUM in access works like 123 did?) but I found the example and notes below under "criteria examples" in the Excel help on DSUM. I tried to figure out how to use it but I do not understand what it means (can't get it to work anyway). Can anyone translate what this means and whether this could solve my problem? I trying to avoid changing the many DSUMs to SUMIFs. Here is the snippet from the online help on criteria examples:
Conditions created as the result of a formul
You can use a calculated value that is the result of a formula as your criterion. When you use a formula to create a criterion, do not use a column label for a criteria label; either keep the criteria label blank or use a label that is not a column label in the list. For example, the following criteria range displays rows that have a value in column C greater than the average of cells C7:C10
=C7>AVERAGE($C$7:$C$10)
Note
The formula you use for a condition must use a relative reference to refer to the column label (for example, Sales) or the corresponding field in the first record. All other references in the formula must be absolute references, and the formula must evaluate to TRUE or FALSE. In the formula example, "C7" refers to the field (column C) for the first record (row 7) of the list
You can use a column label in the formula instead of a relative cell reference or a range name. When Microsoft Excel displays an error value such as #NAME? or #VALUE! in the cell that contains the criterion, you can ignore this error because it does not affect how the list is filtered
When evaluating data, Microsoft Excel does not distinguish between uppercase and lowercase characters