View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default sum if less than and more than a time range

Hmmm...

I am looking for <0.067 and 0.167...(time)


0.067 = 1:36:29 AM
0.167 = 4:00:29 AM

This does what you asked for:

=SUMPRODUCT(--(Import!$Q$2:$Q$86="FB"),--(Import!$Z$2:$Z$86="ME"),--(Import!$A$2:$A$86<=0.067),--(Import!$A$2:$A$86=0.167),Import!$I$2:$I$86)



--
Biff
Microsoft Excel MVP


"thomsonpa" wrote in message
...
I have a nested if formula, where I am looking for the total of the values
in
a range of cells which match 4 ranges of criteria. Total number in cells
listed as "FB" and "ME" less than 0.067 (time) and more than 0.167
(time).
The lists are on a seperate worksheet. I can get the sum to work with 3
criteria, ie. only less than time in one formula and more than time in
another, but not with both.
Any help would be appreciated as I am a novice at this. Here is my formula
for one time frame.
=SUM(IF(IMPORT!$Q$2:$Q$86="FB",IF(IMPORT!$Z$2:$Z$8 6="ME",IF(IMPORT!$A$2:$A$86<=0.167,IMPORT!$I$2:$I$ 86,0),0),0))+SUM(IF(IMPORT!$R$2:$R$86="FB",IF(IMPO RT!$Z$2:$Z$86="ME",IF(IMPORT!$A$2:$A$86<=0.167,IMP ORT!$I$2:$I$86,0),0),0))+SUM(IF(IMPORT!$S$2:$S$86= "FB",IF(IMPORT!$Z$2:$Z$86="ME",IF(IMPORT!$A$2:$A$8 6<=0.167,IMPORT!$I$2:$I$86,0),0),0)

I am looking for <0.067 and 0.167 in the range IMPORT!$I$2:$I$86.