I give up! Nested IF, THEN operations plus COUNT to return a single sum??

lcb803

New Member
Joined
Jul 24, 2012
Messages
2
I am a relative Excel novice, but have thoroughly explored MS Excel Help and other online help forums for an answer to my question, and at this point, I am wondering if what I want to do is even possible? Please help!

I want the formula to return a single sum for multiple conditions (two, to be exact) in a range to a single cell.

The context of my question is a calendar where IF a day (i.e., a cell) has the value "I" in it, THEN I want the formula to COUNT that value as 0.5 (i.e., half of a day).

IF a day (i.e. a cell) has the value "II" in it, THEN I want the formula to COUNT that value as 1 (i.e., a whole day). THEN I want the formula to calculate the sum of the values within the range specified (i.e., the month).

The answer should be 11.5.

SUNMONTUEWEDTHUFRISAT
12345






II
6789101112
IIIIIII


13141516171819







20212223242526

IIIIIIIIIII
2728283031

III





<tbody>
</tbody>
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
You could also use the array formula

Code:
=SUM(IF($A$1:$G$11="I",0.5,IF($A$1:$G$11="II",1,0)))

It must be entered with ctrl+shift+enter
 
Upvote 0
I am a relative Excel novice, but have thoroughly explored MS Excel Help and other online help forums for an answer to my question, and at this point, I am wondering if what I want to do is even possible? Please help!

I want the formula to return a single sum for multiple conditions (two, to be exact) in a range to a single cell.

The context of my question is a calendar where IF a day (i.e., a cell) has the value "I" in it, THEN I want the formula to COUNT that value as 0.5 (i.e., half of a day).

IF a day (i.e. a cell) has the value "II" in it, THEN I want the formula to COUNT that value as 1 (i.e., a whole day). THEN I want the formula to calculate the sum of the values within the range specified (i.e., the month).

The answer should be 11.5.

SUN
MON
TUE
WED
THU
FRI
SAT
1
2
3
4
5












II
6
7
8
9
10
11
12
II
II
II
I






13
14
15
16
17
18
19














20
21
22
23
24
25
26


I
II
II
II
II
II
27
28
28
30
31




II
I











<TBODY>
</TBODY>
One way...

=SUM(COUNTIF(A1:C5,{"I","II"})*{0.5,1})

Adjust the range to suit.
 
Upvote 0
T.Valko and Momentman-- many thanks! Both worked. Thank you so much to everyone who responded. If only I had asked this question before spending countless hours :) Lesson learned!
 
Last edited:
Upvote 0
T.Valko and Momentman-- many thanks! Both worked. Thank you so much to everyone who responded. If only I had asked this question before spending countless hours :) Lesson learned!
You're welcome. Thanks for the feedback! :cool:
 
Upvote 0
Just to say after a general search on the board for guidance form previous questions. Thanks to Tom Urtis the solution you provided (below), works for me , much appreciated. Robert
=COUNTIF(A2:G11,"II")+(COUNTIF(A2:G11,"I")*0.5)
 
Upvote 0

Forum statistics

Threads
1,215,056
Messages
6,122,907
Members
449,096
Latest member
dbomb1414

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
Back
Top