using " in a formula

Qroozn

Well-known Member
Joined
Mar 12, 2002
Messages
543
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
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
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
'---------------
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,732
Members
448,987
Latest member
marion_davis

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top