Nombre con mayusculas

30/05/2005 - 19:26 por Fabian | Informe spam
Alguien me podria pasar un codigo para convertir un nombre con sus iniciales
en mayusculas

juan jose perez
Juan Jose Perez
Busque en Google, encontre esto:
Dim x As Range
For Each x In Selection
If VarType(x.Value) = vbString Then
x.Value = UCase(Left(x.Value, 1)) & LCase(Mid(x.Value, 2))
End If
Next

Lo uso asi: ActiveCell = UCase(Left(ActiveCell, 1)) & LCase(Mid(ActiveCell,
2))
pero no hace lo que necesito.
Gracias.

Preguntas similare

Leer las respuestas

#1 KL
30/05/2005 - 19:40 | Informe spam
Hola Fabian,

?Que tal esto?

Sub test()
With Range("A1")
.Value = WorksheetFunction.Proper(.Value)
End With
End Sub

Saludos,
KL


"Fabian" wrote in message
news:
Alguien me podria pasar un codigo para convertir un nombre con sus
iniciales
en mayusculas

juan jose perez
Juan Jose Perez
Busque en Google, encontre esto:
Dim x As Range
For Each x In Selection
If VarType(x.Value) = vbString Then
x.Value = UCase(Left(x.Value, 1)) & LCase(Mid(x.Value, 2))
End If
Next

Lo uso asi: ActiveCell = UCase(Left(ActiveCell, 1)) &
LCase(Mid(ActiveCell,
2))
pero no hace lo que necesito.
Gracias.


Respuesta Responder a este mensaje
#2 haw
30/05/2005 - 21:20 | Informe spam
hola fabian puedes utilizar la siguiente función:
=NOMPROPIO(A)

"Fabian" escribió:

Alguien me podria pasar un codigo para convertir un nombre con sus iniciales
en mayusculas

juan jose perez
Juan Jose Perez
Busque en Google, encontre esto:
Dim x As Range
For Each x In Selection
If VarType(x.Value) = vbString Then
x.Value = UCase(Left(x.Value, 1)) & LCase(Mid(x.Value, 2))
End If
Next

Lo uso asi: ActiveCell = UCase(Left(ActiveCell, 1)) & LCase(Mid(ActiveCell,
2))
pero no hace lo que necesito.
Gracias.



Respuesta Responder a este mensaje
#3 Fabian
31/05/2005 - 01:58 | Informe spam
Gracias KL.
Mis neuronas me estan fallando, esa funcion ya la habia usado en otra
oportunidad, se me borro de la mente!
Respuesta Responder a este mensaje
#4 Manuel Romero
03/06/2005 - 16:18 | Informe spam
o tambien StrConv(cadena,vbProperCase)

"Fabian" escribió en el mensaje
news:
Alguien me podria pasar un codigo para convertir un nombre con sus
iniciales
en mayusculas

juan jose perez
Juan Jose Perez
Busque en Google, encontre esto:
Dim x As Range
For Each x In Selection
If VarType(x.Value) = vbString Then
x.Value = UCase(Left(x.Value, 1)) & LCase(Mid(x.Value, 2))
End If
Next

Lo uso asi: ActiveCell = UCase(Left(ActiveCell, 1)) &
LCase(Mid(ActiveCell,
2))
pero no hace lo que necesito.
Gracias.


email Siga el debate Respuesta Responder a este mensaje
Ads by Google
Help Hacer una preguntaRespuesta Tengo una respuesta
Search Busqueda sugerida