SUMIF function depend on the cell value

hitmen

New member
Joined
Jan 23, 2014
Messages
8
Reaction score
0
Points
0
Hi everyone, I have a problem with sumif function. I have a report sheet and I want to calculate Total of "Efavirenz 600mg" export from E8 cell value to G8 cell value (pls see the attack file)
 

Attachments

  • Ham sum 3 .xls
    168 KB · Views: 13
If you sort the list in N1:N7 in ascending order, then you can use this formula:

=SUMPRODUCT(SUMIF(INDIRECT("'"&INDEX($N$1:$N$7,MATCH($E$8,$N$1:$N$7,0)):INDEX($N$1:$N$7,MATCH($G$8,$N$1:$N$7,0))&"'!B:B"),$C15,INDIRECT("'"&INDEX($N$1:$N$7,MATCH($E$8,$N$1:$N$7,0)):INDEX($N$1:$N$7,MATCH($G$8,$N$1:$N$7,0))&"'!G:G")))
 
Hi Everyone,

Continuing this topic, i don't know use VBA (see the attach file).
Pls help me.
 

Attachments

  • Ham sum 4.xls
    201.5 KB · Views: 10
Please start a new thread with new questions. You can link to this thread if desired and if relevant.
 
Back
Top