Results 1 to 7 of 7
  1. #1
    Star Lounger
    Join Date
    Aug 2001
    Posts
    66
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Print a quotation mark in a cell's formula. (2000)

    Hey, I want to make a cell's formula include a qutotation mark. Such as,

    "Kevin".

    However, I can't say something like ActiveCell.Formula = ""Kevin"".

    Is there a symbol such as " or something I can use?

  2. #2
    Star Lounger
    Join Date
    Aug 2001
    Posts
    66
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Print a quotation mark in a cell's formula. (2000)

    Oh right, I want to capitalize names that haven't been capitalized using the PROPER() function.

  3. #3
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Print a quotation mark in a cell's formula. (2000)

    How about

    ActiveCell.Formula = chr(34)&"Kevin"&chr(34).

    Not sure what your supplementary question is about !

    Andrew C

  4. #4
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Print a quotation mark in a cell's formula. (2000)

    If you want to Proper Case in VBA, see <A target="_blank" HREF=http://www.wopr.com/cgi-bin/w3t/showflat.pl?Cat=&Board=xl&Number=51219>this thread</A>.
    -John ... I float in liquid gardens
    UTC -7ąDS

  5. #5
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Print a quotation mark in a cell's formula. (2000)

    or perhaps:
    ActiveCell.Value = "Kevin"

    second question- do you mean something like:<pre>Dim strName As String
    Dim strNameTitleCase As String
    strName = Cells(1, 1).Value
    strNameTitleCase = UCase$(Mid$(strName, 1, 1)) & LCase$(Mid$(strName, 2))
    If strName <> strNameTitleCase Then
    Cells(1, 1).Value = strNameTitleCase
    End If
    </pre>

    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  6. #6
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Print a quotation mark in a cell's formula. (2000)

    I understood it that the poster required the value of the cell to be "Kevin", including th equote marks.

    Andrew C

  7. #7
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Print a quotation mark in a cell's formula. (2000)

    Kevin, You just needed one more quote:<pre>ActiveCell.Formula = """Kevin"""</pre>

    If you want to add the Proper function, then in Excel, use the Tools > Add-Ins menu to add the Analysis ToolPak - VBA and use <pre>ActiveCell.Formula = Chr(34) & [Proper("kevin youcd")] & Chr(34)</pre>

    Hope this helps! --Sam
    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

Posting Permissions

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