# SUMIFS with multiple criteria, cell referencing

#### IanBr

##### New Member
Hi,

Following the brilliantly fast response I got yesterday, I thought I'd try a trickier question. I'll be honest, I think of myself as good with excel but am very capable of getting completely lost when it comes to complex formula!

I've got a SUMIFS formula which picks up spend of a particular client which is between 2 values as follows:

=SUMIFS('Full Data COMPLETED'!\$E\$3:\$E\$54342,'Full Data COMPLETED'!\$D\$3:\$D\$54342,">"&\$F5,'Full Data COMPLETED'!\$D\$3:\$D\$54342,"<="&\$G5,'Full Data COMPLETED'!\$B\$3:\$B\$54342,B3)

So to my simple mind this is looking for the customer in B3, searching column B of tab 'Full Data COMPLETED' for this customer then returning the sum of values in column D of tab 'Full Data COMPLETE' which are between the values in cell F5 and G5 - this works perfectly.

Now what I want to do is to be able to put multiple customer references in cells B3, B4, B5.....B100 and for the answer returned to be the sum of sales between the same values from any customer listed between B3 and B100

How do I do this short of having a massively long formula listing out the whole calculation 100 times?

Thanks in advance for any help

#### IanBr

##### New Member
Sorry, description of above should say it returns the sum of the values in column E where the value in column D is between the values in cells F5 and G5 (the purpose being - search for customers who's previous year's sales were between 1000 and 2000 and calculate total spend of these customer this year)

#### RoryA

##### MrExcel MVP, Moderator
You could try something like this:

=SUMPRODUCT(SUMIFS('Full data COMPLETED'!\$E\$3:\$E\$54342,'Full data COMPLETED'!\$D\$3:\$D\$54342,">"&\$F5,'Full data COMPLETED'!\$D\$3:\$D\$54342,"<="&\$G5,'Full data COMPLETED'!\$B\$3:\$B\$54342,B3:B5))

#### IanBr

##### New Member
Thank you very much - that's perfect