Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: using " in a formula

  1. #1
    Board Regular
    Join Date
    Mar 2002
    Location
    Sydney/Brisbane , Australia
    Posts
    542
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    i am trying to do vba code to get PROPER capitalisation of a name.

    customer = range("d2").value ---> (joe blow)
    Range("B11").Value = "=PROPER(" & "" & customer & "" & ")"


    i can get customer. but i cant get the code in b11 to put the correct formula.. I need it to read
    b11: =PROPER("joe blow") ---->=Joe Blow


    help is urgently needed please

  2. #2
    MrExcel MVP Jay Petrulis's Avatar
    Join Date
    Mar 2002
    Location
    Chicago, IL USA
    Posts
    2,040
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Do you want the function to be sent to the worksheet or just the resulting adjusted string?

    Both are provided here:

    '--------------
    Sub test()
    Dim customer As String

    customer = Range("d2").Address(False, False)
    Range("B11") = "=PROPER(" & customer & ")"

    End Sub

    Sub test2()
    Dim customer As String

    customer = Range("d2")
    Range("B11") = WorksheetFunction.Proper(customer)

    End Sub
    '---------------

  3. #3
    Board Regular
    Join Date
    Mar 2002
    Location
    Sydney/Brisbane , Australia
    Posts
    542
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Thanks Jay.
    i didnt think about the function property.

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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