Multiple functions in one cell

reid1201

New Member
Joined
Sep 18, 2014
Messages
2
In a single cell, I want to sum a range of numbers, then if that sum meets a certain criterion, then the cell will produce a result. for example: in G4, I want to sum A4:F4, if that sum = 12, then I want it to show the date listed in cell G3.

Is this possible?

Steven
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

Benvolio

New Member
Joined
Jul 23, 2012
Messages
33
How about
=IF(SUM(A4:F4)=12, G3, SUM(A4:F4))

To expand upon Mike's (correct) answer, if you wanted the cell to return a different value if the sum was not correct you just insert it into the end of the IF expression; so =IF(SUM(A4:F4)=12, G3, "Sum not correct") or =IF(SUM(A4:F4)=12, G3, "") for a blank cell, etc.
 
Upvote 0

reid1201

New Member
Joined
Sep 18, 2014
Messages
2
ADVERTISEMENT
Thanks everyone. That did exactly what I wanted it to. Looking at it now it seems so straightforward. But when I was working on it last night, I just couldn't figure it out. I appreciate the help.
 
Upvote 0

mikerickson

MrExcel MVP
Joined
Jan 15, 2007
Messages
24,350
^^ sleep does that :)

Seriously, sleep is one of my most successful problem solving techniques, surpassed only by asking for help. Its not that I get good help, its that composing the question clears out the irrelevances and brings the issue at hand into focus.
 
Upvote 0

bluemjk

New Member
Joined
Sep 19, 2014
Messages
8
ADVERTISEMENT
New to the forum. I have one for you guys. In one cell, I need the sum of three cells; however, if NA appears then it is zero. Then, those same three cells need to be multiplied by 100, divided by 3 and then divided by 10. I have been at it for about four hours. Talk about a waste of man-hours. Can anyone assist?
 
Upvote 0

mikerickson

MrExcel MVP
Joined
Jan 15, 2007
Messages
24,350
How about
=IFERROR(SUM(A1:A3)*10/3, 0)

If the three cells aren't next to each other, use syntax like SUM(B1, D5, E34)
 
Upvote 0

bluemjk

New Member
Joined
Sep 19, 2014
Messages
8
Thanks Mikerickson. However, when I use this formula, it calculates either the sum or zero. This occurs even when I use the syntax referenced above. The cells with the data are F9 (100%), F12 (77.8%), F15 (#N/A) and the formula is entered in cell F18 (0.0). I would need to be able to have the formula calculate the average, reading N/A as 0.

The reason F15 is entered as n/a is to reflect no data reported for the month and I need this entry to suppress the data point in my line chart.

Hope I am making sense..
 
Upvote 0

Forum statistics

Threads
1,195,855
Messages
6,011,973
Members
441,658
Latest member
Carlos O

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top