#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 410
Default Sumproduct to divide

I am trying to write a formula using Sumproduct to dived data. I
understand that the reciprocal of a number multiplied is the same as
dividing so Sumproduct shoudl work. the problem is that there are
blanks in the data and then it is diving by one.
=Sumproduct(A1:A5,1/B1:B5) This works fine if there are no 0 or
blanks.

Thanks,
Jay
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Sumproduct to divide

Try this array formula** :

Assuming the range will contain *numbers only*, no text, no formula blanks.

=SUM(IF(B1:B5<0,A1:A5*1/B1:B5))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)

--
Biff
Microsoft Excel MVP


"jlclyde" wrote in message
...
I am trying to write a formula using Sumproduct to dived data. I
understand that the reciprocal of a number multiplied is the same as
dividing so Sumproduct shoudl work. the problem is that there are
blanks in the data and then it is diving by one.
=Sumproduct(A1:A5,1/B1:B5) This works fine if there are no 0 or
blanks.

Thanks,
Jay



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 410
Default Sumproduct to divide

Biff,
I have another part to the same question. What happens if there is a
third variable present? Say C olumn must also match. C is text.
Thanks,
Jay

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Sumproduct to divide

If I understand you...

Array entered:

=SUM(IF((B1:B5<0)*(C1:C5="this"),A1:A5*1/B1:B5))

If your numbers in column B are *always* positive:

=SUM(IF((B1:B50)*(C1:C5="this"),A1:A5*1/B1:B5))

I'm more "comfortable" using 0 rather than <0.


--
Biff
Microsoft Excel MVP


"jlclyde" wrote in message
...
Biff,
I have another part to the same question. What happens if there is a
third variable present? Say C olumn must also match. C is text.
Thanks,
Jay



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Divide By help? kirstie adam Excel Worksheet Functions 2 December 5th 06 04:23 PM
divide Marc Excel Discussion (Misc queries) 2 September 22nd 06 02:34 AM
divide by zero belliotb Excel Worksheet Functions 3 May 18th 06 05:01 PM
divide by 0 sony654 Excel Worksheet Functions 4 April 24th 05 08:10 AM
Divide one row over other row I dont wont to divide one number Rick Excel Discussion (Misc queries) 0 March 4th 05 07:13 PM


All times are GMT +1. The time now is 04:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"