# SUM only certain ones

#### crazyd

##### New Member
I asked this before, but I think I may have asked it wrong.
I have a driving log. In column D5 thru D73 is to put either Day or Night. In Column F5 thru F73 is total drive time. I need at the bottom of the sheet to have a total for all day time and a different total adding all of the ones that say night. Is this possible?

### Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
On 2002-09-03 06:59, crazyd wrote:
I asked this before, but I think I may have asked it wrong.
I have a driving log. In column D5 thru D73 is to put either Day or Night. In Column F5 thru F73 is total drive time. I need at the bottom of the sheet to have a total for all day time and a different total adding all of the ones that say night. Is this possible?
Try this:
=SUMIF(D5:D73,"Night",F5:F73)

HTH
texasalynn

Hi Crazyd,

you can use the SUM.IF function to select what you want to total.

total:=SUM(F5:F73)
total day:=SUM.IF(D5:D73,"Day",F5:F73)
total night:=SUM.IF(D5:D73,"Night",F5:F73)

Geert

Ok sorry, I didn't fully read the message. Thanks for the help. It worked great.

Replies
1
Views
101
Replies
5
Views
512
Replies
1
Views
109
Replies
2
Views
121
Replies
5
Views
180

1,203,528
Messages
6,055,928
Members
444,835
Latest member

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

### Which adblocker are you using?

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

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