Forum Discussion
Stephen_Pisano
Feb 07, 2020Copper Contributor
Totalling a column that includes an ‘IF’ formula that produces a number
I have created a column of numbers, 0 or 1, that is produced with an IF command in each cell relating to an adjacent column of cells, eg O20 and so on. When I use a SUM formula eg =SUM(P20:P45) to tot...
Charla74
Feb 07, 2020Iron Contributor
You might have this issue if the returned 1's are text rather than a number - does your formula resemble this:
=IF(true_value, "1", "0") - The speech marks denote that the results would be text and would not be summed.
=IF(true_value, 1, 0) - This version would return numbers as a result and can be summed.
If you can share a copy of your workbook we can take a look.
=IF(true_value, "1", "0") - The speech marks denote that the results would be text and would not be summed.
=IF(true_value, 1, 0) - This version would return numbers as a result and can be summed.
If you can share a copy of your workbook we can take a look.
Stephen_Pisano
Feb 08, 2020Copper Contributor
Hi there, I tried =SUMPRODUCT(P20:P45*1) and it works perfectly. Thanks for your suggestions.