A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

IF statement syntax error when referencing another worksheet cell



 
 
Thread Tools Display Modes
  #1  
Old December 5th, 2003, 07:18 PM
Peo Sjoblom
external usenet poster
 
Posts: n/a
Default IF statement syntax error when referencing another worksheet cell

One way

=IF(INDIRECT("'[Project_Status.xls]TestItems'!"&(CONCATENATE("$F$",J5)))0,"
ERROR", "PROCEED")

now the drawback,for indirect to work both workbooks have to be open.

--

Regards,

Peo Sjoblom


"QEM" wrote in message
...
System: MS Windows 97 on Windows NT

Step 1 worksheet 1 - Successfully Derived the value of the row to

reference in worksheet 2 using
=MATCH(A8,'[Project_Status.xls]TestItems'!$A$1:$A$2000,0)

Step 2 worksheet 1 - Successfully concatenated the row value derived in

step 1 with the column variable to create a cell
location. =CONCATENATE("$F$",J5)

Step 3 worksheet 1 - Trying to use an IF statement to evaluate the

contents of the cell in worksheet 2 and issue an error if the cell has a
value.=IF('[Project_Status.xls]TestItems'!(CONCATENATE("$F$",J5))0,"ERROR",
"PROCEED")

PROBLEM: Syntax error occurs between TestItems'!(CON... I can't find any

info on Help or the book.



  #2  
Old December 5th, 2003, 07:24 PM
Bob Phillips
external usenet poster
 
Posts: n/a
Default IF statement syntax error when referencing another worksheet cell

QEM,

How about
=IF('[Project_Status.xls]TestItems'!(INDIRECT(CONCATENATE("$F$",J5)))0,"ER R
OR", "PROCEED")

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"QEM" wrote in message
...
System: MS Windows 97 on Windows NT

Step 1 worksheet 1 - Successfully Derived the value of the row to

reference in worksheet 2 using
=MATCH(A8,'[Project_Status.xls]TestItems'!$A$1:$A$2000,0)

Step 2 worksheet 1 - Successfully concatenated the row value derived in

step 1 with the column variable to create a cell
location. =CONCATENATE("$F$",J5)

Step 3 worksheet 1 - Trying to use an IF statement to evaluate the

contents of the cell in worksheet 2 and issue an error if the cell has a
value.=IF('[Project_Status.xls]TestItems'!(CONCATENATE("$F$",J5))0,"ERROR",
"PROCEED")

PROBLEM: Syntax error occurs between TestItems'!(CON... I can't find any

info on Help or the book.



  #3  
Old December 5th, 2003, 08:14 PM
Bob Phillips
external usenet poster
 
Posts: n/a
Default IF statement syntax error when referencing another worksheet cell

Oops, got the INDIRECT in the wrong place. See Peo's post for the right
place.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Bob Phillips" wrote in message
...
QEM,

How about

=IF('[Project_Status.xls]TestItems'!(INDIRECT(CONCATENATE("$F$",J5)))0,"ER R
OR", "PROCEED")

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"QEM" wrote in message
...
System: MS Windows 97 on Windows NT

Step 1 worksheet 1 - Successfully Derived the value of the row to

reference in worksheet 2 using
=MATCH(A8,'[Project_Status.xls]TestItems'!$A$1:$A$2000,0)

Step 2 worksheet 1 - Successfully concatenated the row value derived in

step 1 with the column variable to create a cell
location. =CONCATENATE("$F$",J5)

Step 3 worksheet 1 - Trying to use an IF statement to evaluate the

contents of the cell in worksheet 2 and issue an error if the cell has a

value.=IF('[Project_Status.xls]TestItems'!(CONCATENATE("$F$",J5))0,"ERROR",
"PROCEED")

PROBLEM: Syntax error occurs between TestItems'!(CON... I can't find any

info on Help or the book.





  #4  
Old December 8th, 2003, 03:11 PM
QEM
external usenet poster
 
Posts: n/a
Default IF statement syntax error when referencing another worksheet cell

Thanks A million!!!!!!!!! I tried INDIRECT but I didn't have the & before concatenate so I was still getting errors. You have saved me a ton of time.
  #5  
Old December 8th, 2003, 03:11 PM
QEM
external usenet poster
 
Posts: n/a
Default IF statement syntax error when referencing another worksheet cell

Bob,

Thanks for the feedback. I have it working. I really appreciate your quick response!
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:35 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.