Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default need help in writing a statement

I am trying the following using VBA:

If [b2] = 5 Then [b3] = "blp("GE Equity","Last Price") Else [b3] = ""

in writing this I get a Compile error with GE highlighted, with a
warning reading "Expected: end of statement."

I think its the ". . ." ". . . " quotations inside that are causing
the problem. Is there a way of writing, the following statement:

= blp("GE Equity","Last Price")

so it comes out (appears) in cell B3.

Thank you in advance


Susan

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 863
Default need help in writing a statement

To embed quotes inside the string, you must double them, i.e.

[b3] = "blp(""GE Equity"",""Last Price"") Else ....


On Mon, 27 Sep 2004 18:05:57 -0400, susan hayes wrote:

I am trying the following using VBA:

If [b2] = 5 Then [b3] = "blp("GE Equity","Last Price") Else [b3] = ""

in writing this I get a Compile error with GE highlighted, with a
warning reading "Expected: end of statement."

I think its the ". . ." ". . . " quotations inside that are causing
the problem. Is there a way of writing, the following statement:

= blp("GE Equity","Last Price")

so it comes out (appears) in cell B3.

Thank you in advance


Susan


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default need help in writing a statement

Double check your quotes. They don't all match up. You have 7 in total...
Probably a problem with "blp

"susan hayes" wrote:

I am trying the following using VBA:

If [b2] = 5 Then [b3] = "blp("GE Equity","Last Price") Else [b3] = ""

in writing this I get a Compile error with GE highlighted, with a
warning reading "Expected: end of statement."

I think its the ". . ." ". . . " quotations inside that are causing
the problem. Is there a way of writing, the following statement:

= blp("GE Equity","Last Price")

so it comes out (appears) in cell B3.

Thank you in advance


Susan


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 863
Default need help in writing a statement

Looks like I omitted the final quote. Should be

[b3] = "blp(""GE Equity"",""Last Price"")" Else ....


On Mon, 27 Sep 2004 17:14:04 -0500, Myrna Larson
wrote:

To embed quotes inside the string, you must double them, i.e.

[b3] = "blp(""GE Equity"",""Last Price"") Else ....


On Mon, 27 Sep 2004 18:05:57 -0400, susan hayes wrote:

I am trying the following using VBA:

If [b2] = 5 Then [b3] = "blp("GE Equity","Last Price") Else [b3] = ""

in writing this I get a Compile error with GE highlighted, with a
warning reading "Expected: end of statement."

I think its the ". . ." ". . . " quotations inside that are causing
the problem. Is there a way of writing, the following statement:

= blp("GE Equity","Last Price")

so it comes out (appears) in cell B3.

Thank you in advance


Susan


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
NEED HELP WRITING IF STATEMENT bumblebug Excel Discussion (Misc queries) 5 October 7th 08 01:34 PM
Writing IF Statement Angie Excel Worksheet Functions 4 June 5th 07 10:10 PM
Statement writing problem Clay Excel Worksheet Functions 4 March 15th 07 04:55 PM
writing a statement newexceluser Excel Worksheet Functions 1 July 21st 06 10:15 PM
Help writing an IF statement cynichromantique Excel Worksheet Functions 6 April 1st 06 12:51 AM


All times are GMT +1. The time now is 04:46 PM.

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

About Us

"It's about Microsoft Excel"