# How to use SUM or other functions to sum the cells of the established IF function in Excel?

21 Reputation points
2022-04-20T06:03:15.78+00:00

The cell formula of the established IF function is =IF(O2+P2+Q2<=80,"80",IF(O2+P2+Q2<=110,"150",IF(O2+P2+Q2<=140 ,"190",IF(O2+P2+Q2<=140,"190","230"))))

I want to add up these result values, but I can't use SUM to add them up. Is there any other way besides “+” one by one?

Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,641 questions
Excel Management
Excel Management
Excel: A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.Management: The act or process of organizing, handling, directing or controlling something.
1,669 questions

1. 27,556 Reputation points
2022-04-20T08:16:16.697+00:00

Hi @尉寧 羅

> I want to add up these result values, but I can't use SUM to add them up.

Is the data in O2, P2 and Q2 changed dynamically, you want to capture the results shown in one cell that generated via the formula and add these results together?
If so, I am afraid you need the VBA code to capture the result each time and do cumulative calculations.
(But please note, I'm mainly responsible for general issues of Excel client, for VBA code issues, you need to add tag "office-vba-dev". It's recommended to wait for VBA experts' suggestions. Thanks for your understandings.)

Or does the formula will be dragged down for a range? such as `=IF(O3+P3+Q3<=80,"80",IF(O3+P3+Q3<=110,"150",IF(O3+P3+Q3<=140 ,"190",IF(O3+P3+Q3<=140,"190","230"))))` and so on,
If so, you can use SUM function, and apply the formula to the corresponding cell range of results.