View Single Post
  #1  
Old April 27th, 2010, 09:54 PM posted to microsoft.public.excel.worksheet.functions
Steve
external usenet poster
 
Posts: 2,662
Default compound if equation?

Howdee all.
Hope everyone's afternoon, evening, etc... are going well.

I have a dual worksheet function that requires something more compound that
I've used before.
Thus far, I've tried using an if equation, that looks through a dataset with
a sumproduct, and if the dataset matches, I perform one equation, and if not,
another.
E.g.,

=IF(SUMPRODUCT((APN!$E$4:$E$95&""=$A11&"")*(APN!$F $4:$F$95=$C11)*(APN!$B$4:$B$95))0,SUMPRODUCT((AP N!$E$4:$E$95&""=$A11&"")*(APN!$F$4:$F$95=$C11)*(AP N!$B$4:$B$95))/TRIM(LEFT($F$6,4))*$E$6,SUMPRODUCT((APN!$E$97:$E$1 73&""=$A11&"")*(APN!$F$97:$F$173=$C11)*(APN!$B$97: $B$173))/TRIM(LEFT($F$7,4))*$E$7)

The issue that I've found is that there is a handful of datum that has
values in both ranges-- 4 through 95, AND 97 through 173.
This would require me to have both equations.

What would be a better way to handle this?

Thank you.