formula para convertir numeros a letras en excel

Páginas: 3 (584 palabras) Publicado: 3 de septiembre de 2014
(FORMULA) CONVERTIR NUMEROS A LEYTRAS EN EXCEL

Convertir Numeros a Letras en Exel (Argentina) 
abris un exel, vas a herramientas, macro, macros. Donde dice nombre de la macro, pones n1 y despueshacé click en crear. 
Te va a abrir un Visual Basic. Justo donde está el cursor, pegá lo siguiente: 

Public Function NL(ByVal Numero As Double) As String 
Dim NumTmp As String 
Dim c01 AsInteger 
Dim c02 As Integer 
Dim pos As Integer 
Dim dig As Integer 
Dim cen As Integer 
Dim dec As Integer 
Dim uni As Integer 
Dim letra1 As String 
Dim letra2 As String 
Dim letra3 As String Dim Leyenda As String 
Dim Leyenda1 As String 
Dim TFNumero As String 
If Numero < 0 Then Numero = Abs(Numero) 
NumTmp = Format(Numero, "000000000000000.00") 
c01 = 1 
pos = 1 
TFNumero = "" Do While c01 = 1 And Val(Mid _ 
(NumTmp, 7, 3)) = 0 Then 
Leyenda = "Mil Millones " 
ElseIf cen + dec + uni >= 1 Then 
Leyenda = "Mil " 
End If 
Case 3 
If cen + dec = 0 And uni = 1 Then Leyenda = "Millon " 
ElseIf cen > 0 Or dec > 0 Or uni > 1 Then 
Leyenda = "Millones " 
End If 
Case 4 
If cen + dec + uni >= 1 Then 
Leyenda = "Mil " 
End If 
Case 5 
If cen + dec + uni >= 1Then 
Leyenda = "" 
End If 
End Select 
c01 = c01 + 1 
TFNumero = TFNumero + letra3 + letra2 + _ 
letra1 + Leyenda 
Leyenda = "" 
letra1 = "" 
letra2 = "" 
letra3 = "" 
Loop 
If Val(NumTmp) = 0Or Val(NumTmp) < 1 Then 
Leyenda1 = "Cero Pesos" 
ElseIf Val(NumTmp) = 1 Or Val(NumTmp) < 2 Then 
Leyenda1 = "Pesos " 
ElseIf Val(Mid(NumTmp, 4, 12)) = 0 Or Val(Mid _ 
(NumTmp, 10, 6)) = 0 Then Leyenda1 = "de Pesos " 
Else 
Leyenda1 = "Pesos " 
End If 
TFNumero = "Son Pesos " & TFNumero & "con " & Mid _ 
(NumTmp, 17) & "/100" 
TFNumero = UCase(TFNumero) 
NL = TFNumero 
EndFunction 
Private Function Centena(ByVal uni As Integer, _ 
ByVal dec As Integer, ByVal cen As Integer) As String 
Select Case cen 
Case 1 
If dec + uni = 0 Then 
cTexto = "cien " 
Else 
cTexto =...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Convertir Numeros A Letras Excel
  • Convertir Numeros A Letras En Excel
  • Convertir Numeros a Letras En Excel
  • convertir numero a letra en excel
  • convertir-numeros-a-letras-en-excel
  • Formula Excel Numero A Letra
  • Codigo para convertir numeros a letras (pesos) en excel
  • convertir numeros a letras

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS