Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

[Excel] Indirect Function with Quotes/Quotation Marks

Status
Not open for further replies.
Apr 9, 2002
102
US
I am trying to use the Indirect function to handle the formula below (not my actual formula, but a simplified version):


=IF(F10=0, "Correct", "Incorrect")

When I type in the following formula to use the indirect function I get a #Value error:

=Indirect("=IF(F10=0, " & """" & "Correct" & """" & "," & """" & "Incorrect" & """" & ")")

What am I doing wrong? I have tried a number of ways to handle the quotation marks around the Correct and Incorrect, including single quotes, but nothing appears to work.

Thanks in advance for your help.

Marrow


Marrow
 



hi,

If you have Named Ranges of Correct and Incorrect, then...
[tt]
=INDIRECT(IF(F10=0, "Correct", "Incorrect"))
[/tt]


Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 

Works for me, I used your formula (in cell G10)"
[tt]=IF(F10=0,"Correct","Incorrect")[/tt]
and it works just fine (Excel 2003)

Have fun.

---- Andy
 
If you want to evaluate an actual formula that is stored as a string you are going to need VBA or use a defined name to access the Excel4Macro function EVALUATE.

Cheers, Glenn.

Beauty is in the eye of the beerholder.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top