Using SUMPRODUCT

  • Thread starter Thread starter Jack Gillis
  • Start date Start date
J

Jack Gillis

With the help of Max and Bob Phillips here in this forum, I have been able
to use the Sumproduct function to produce values in a workbook. Here is
the function as I have made it:

=SUMPRODUCT(--(SName="ANDA"),--(SType="BOND")*SAmount)

I produces the values I want in every case where I insert different
arguments for Anda and Bond. However, an oddity arises. If I open the
workbook and immediately close it, I get a message asking do I want to save
the changes. I have made no changes I am aware of either with the mouse or
keyboard so I don't understand why I get this message unless the function
itself makes some changes that I don't know about. Can someone help me
avoid this?

One other question about the function. Without the --'s in the function it
doesn't work. I have not been able to find what the --'s are there for. Is
there a reference to them somewhere around that can help me understand this?

As always, thank you very much.
 
For your latter question

http://www.mcgimpsey.com/excel/formulae/doubleneg.html


That particular formula has nothing to do with the saving prompt, you must
have something else in the workbook, for example a function like TODAY()
will do this, all volatile functions will make excel prompt for this. Are
the sumproduct formula the only formulas in the whole workbook, then you
must have something else like for instance a tool from the control toolbox,
a macro that runs when the workbook opens etc..


Regards,

Peo Sjoblom
 
Peo, thank you.

What you say makes perfect sense. The fact remains, though, that without
the sumproduct function in the workbook, the workbook opens and closes with
no problem. If I enter just one instance of the function, I get the message
asking about saving changes. I know of no macros that run when the workbook
or any of its sheets are loaded or activated except for those in
Personal.XLS and none of those do volatile things.

I will go over the workbook very carefully and check again.

Thank you.
 
Back
Top