+ Reply to Thread
Results 1 to 5 of 5

problem defining quote sign " in formula property applied to range object

  1. #1
    Registered User
    Join Date
    08-22-2012
    Location
    Zagreb, Croatia
    MS-Off Ver
    Excel 2003
    Posts
    61

    problem defining quote sign " in formula property applied to range object

    Hi to all,
    I tried to declare some complex expression in vba sentence putting formula in one cell. My sentence include definition of some constant with quote sign(s). Lets simplified, I have to put formula =if(a1="OK";1;2) to the cell by vba code.
    The problem arises when the VBA code define a string to be passed into the cell because it is a string enclosed in quotation marks himself. Quotes contained within the string causing the error. I tried to define the quotation mark using chr function chr (34), and merged the full expression with concatenation, but again there is a mistake.

    Please Login or Register  to view this content.
    Does anyone know how to make the above formula could be realized?
    My real formula is much complicate than this example, but problem is the same - not possible to put quotation mark consisting in definition of formula need to put in cell by vba code.

  2. #2
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: problem defining quote sign " in formula property applied to range object

    Hi
    change ";" into "," and it will be ok
    Regards

    tom1977

    If You are satisfied with my solution click the small star icon on the left to say thanks.

  3. #3
    Registered User
    Join Date
    08-22-2012
    Location
    Zagreb, Croatia
    MS-Off Ver
    Excel 2003
    Posts
    61

    Re: problem defining quote sign " in formula property applied to range object

    tom,
    its amazing, realy. I'd like to explain where problem realy is. I have international setup as croatian - we are using comma sign "," as decimal point. Because of that, this sign can not be used in cell functions as delimiter. Office for our croatian setup demand to use ";" as a delimiter of any function atributes. But... you are perfectly right, vba code has to use comma in formula description and automaticly change "," with ";" when put in the cell. Realy works. Thanks very much once again.

    How I can mark thread as solved ?

  4. #4
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: problem defining quote sign " in formula property applied to range object

    Maybe because in Polish office is the same?

  5. #5
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: problem defining quote sign " in formula property applied to range object

    @ mnjofra

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you couldn't find the way to mark your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1