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

尉寧 羅 21 Reputation points

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
0 comments No comments
{count} votes

Accepted answer
  1. Emily Hua-MSFT 27,556 Reputation points

    Hi @尉寧 羅

    According to your descruptions, can you share us with a simple sample to show more details?

    > 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.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

0 additional answers

Sort by: Most helpful