Forum Discussion
How to sum dollar amounts
Hello,
as a human being, how do you identify the numbers you want to include in the sum? Is there a pattern? How would you describe the logic in words? You need to give Excel something logical, some rules to work out which number to sum. The $ sign in front of the number can possibly work.
The Cell() function can identify certain formats. If a number is formatted with an accounting or a currency format, the formula CELL("format",A1) will return the letter C, followed by the number of decimals of the format, i.e. C2 for a number formatted with 2 decimals. Other letters returned could be P for percentage or G for General.
You could try using a helper column with the Cell formula cited above, but extracting only the first character. =LEFT(CELL("format",B1),1)
Then run a Sumif() to sum only the cells in the values column where the helper column has a "C".
Note that if you change the format of a cell, you will need to recalculate the cell manually for the Cell function to update.
Does that help?