Calculation

  • Thread starter Thread starter alen_re
  • Start date Start date
A

alen_re

Hi !

I have a problem, I can't figure this out :)

I have a formula:

=SUMPRODUCT(--(Selling!F5:F30000="Laser printers
mono");--(Selling!A5:A30000>=--F1);--(Selling!A5:A30000<=--F2))

so this formula calculates for me in how many cells I have "Laser
printers mono" and F1 and F2 are dates, like a criteria..
Now I want my formula to calculate also cells H, I, J, K, L.. in these
cells are numbers of sold "Laser printers mono"..
The formula I've got now only calculates in how many cells I have the
word "Laser printers mono", now I want it to calculate numbers in the
cells I've added.. and show it..

Thanks a lot.. I hope you understand me :)
 
Try this

=SUMPRODUCT((Selling!F5:F30000="Laser printer
mono")*(Selling!A5:A30000>=--F1)*(Selling!A5:A30000<=--F2)*Selling!H5:L30000
 
Sub RSQ()
Dim Rng As Variant
Rng = Selection
Range("G10").FormulaArray = "= RSQ(" & Selection.Address & ",ROW(" &
Selection.Address & "))": _
Range("G10") = Range("G10").Value
' I want to replace C2:C11 with Rng in the line above
End Sub

However, in Excel versions prior to 2003, CORREL()^2 is numerically better
than RSQ()

Jerry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top