![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Mar 2002
Location: Sydney/Brisbane , Australia
Posts: 539
|
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 |
|
MrExcel MVP
Join Date: Mar 2002
Location: Chicago, IL USA
Posts: 2,042
|
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 |
|
Board Regular
Join Date: Mar 2002
Location: Sydney/Brisbane , Australia
Posts: 539
|
Thanks Jay.
i didnt think about the function property. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|