quotation marks

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can someone tell me what the quote space quote does at the
end of this formula? I thought it was susposed to return
a blank cell, but it doesn't work.


=IF(AND(G11=-1,G10^-1),"Sell",IF(AND
(G11=1,G10^1),"Buy"," "))
 
Hi!

G10^-1 is not an acceptable condition.
To return a blank cell use "" not " "

You can always test conditions using e.g.

=G11=-1
Returns TRUE or FALSE
=AND(A1=3,B1=4)
Returns TRUE or FALSE

=G10^-1
Returns #Div/0!

An IF function condition must evaluate to TRUE or FALSE.

--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 
Hi, Norman . . . thanks, but can you clear something up
for me?

When I try to put the formula the way it was written in
the book that I took this from, I get an error message and
it wants me to change the G10^=1 to G10^1. When I do that
the error goes away.

Here is the formula the way the book says it should be:

H11 =IF(AND(G11=-1,G10^=-1,"Sell",IF(AND
(G11=1,G10^=1,"Buy",""))

Why won't it accept the = sign before the -1?

Thanks for your help. I've been pulling my hair out.

GJ
 
Hi GJ!

Are you sure the book doesn't say

G10>=-1

G10^1 is the same as G10

Tell us is words what your condition is for G10.

Which book and page number might help because someone here will
probably have a copy.

--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 
It's called A Short Course in Technical Trading, p. 43.

The book definitely shows an exponentiation sign.

Excel tried to correct it every time to leave out the =
sign. They correct it as G10^-1 and leaves out the equal
sign.

So wierd.

GJ
 
And I think that's key--G10 is supposed to be empty at
this point, but in the future it will start having a
number in it, as you copy the formulas down the worksheet.

I just hate to put in a number because I'm afraid that it
will make the worksheet incorrect and I could lose $$$$$.

Thanks,

GJ
 
Hi GJ!

You still have problems with your formula:

You wrote:
=IF(AND(G11=-1,G10^=-1,"Sell",IF(AND(G11=1,G10^=1,"Buy",""))

Let's correct the syntax first!

=IF(AND(G11=-1,G10^=-1),"Sell",IF(AND(G11=1,G10^=1),"Buy",""))

Now let's try to understand the first AND(G11=-1,G10^=-1)

What is this supposed to mean as far as G10 is concerned?

Same with AND(G11=1,G10^=1)

What is this supposed to mean as far as G10 is concerned?

If (from later post) you're looking for G10 to be blank, then:

=IF(AND(G11=-1,G10=""),"Sell",IF(AND(G11=1,G10=""),"Buy",""))

This will only return "Sell" if G11=-1 and G10 is empty or contains a
formula returning ""
Similarly, it will only return "Buy" if G11=1 and G10 is empty or
contains a formula returning ""
In all other cases it will return "".

--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 
My "guess" is that the author is using both +1 & -1 as some type of flag.
Looks like a typo error to me.

AND(G11=-1,G10=-1)...etc
and also:
AND(G11=1,G10=1)...etc

Just a guess of course.
 
Hi Dana!

OP sent me the workbook in the end. You're right! A typing error and
it was a case of using flags.

--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 

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