# If Cell is between specified dates then perform sum how?

#### NauticaX

##### New Member
I tried search and googling but I can't seem to figure out how to do it with dates.

I would like to perform this =-P6+C6+U6 in say Cell W6 but only if

Cell D6 has a date greater then 1/15/06 but less then or equal to 1/31/06

Would I use the SUMIF function?

TIA

### Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

#### just_jon

##### Legend
NauticaX said:
I tried search and googling but I can't seem to figure out how to do it with dates.

I would like to perform this =-P6+C6+U6 in say Cell W6 but only if

Cell D6 has a date greater then 1/15/06 but less then or equal to 1/31/06

Would I use the SUMIF function?

TIA

Try

Code:
``=IF(AND(D6>X1,D6<X2),C6-P6+U6,"")``
Where X1 and X2 hold your start and stop dates.

Edit for code tags...

#### Barry Katcher

##### Well-known Member
Try this:
Book1
CDEFGHIJKLMNOPQRSTUVW
4Start1/15/2006
5End1/31/2006
651/20/2006210-3
Sheet1

Coises! Beat to the punch again. Oh well, it was just jon.

#### NauticaX

##### New Member
SWEET! That works thanks a lot. If I could give you guys a hug I would

#### just_jon

##### Legend
NauticaX said:
SWEET! That works thanks a lot. If I could give you guys a hug I would

Even after seeing Barry's gif?

#### Barry Katcher

##### Well-known Member
...or just jon's avatar? Keep on smilin', dog.

Replies
2
Views
141
Replies
29
Views
2K
Replies
4
Views
126
Replies
4
Views
75
Replies
3
Views
188