Hola, respecto a lo que publiqué en ese foro que comentas decir que con 12000 celdas es para que se entienda, que no tengo 3 o 4 cables como para estar copiando y pegando formulas ya que como se puede entender da lugar a colarte y pegar una en la celda que no es sobre todo cuando llevas ya un buen rato con ello. Respecto a utilizar una hoja auxiliar es tal y como lo planteé. De hecho el código de Leopoldo Blancas me funcionó perfecto, quedando ese desafío resuelto. Donde estaba el problema?Que cuando ejecutaba la macro me pegaba en las celdas en blanco la fórmula en inglés, que es como tengo el excel en un ordenador de trabajo, y no reconoce las funciones en este otro ordenador también de trabajo y que está en español (que por politicas de empresa no tengo permitido cambiar, capado) Por tanto aunque el código estaba genial no puedo utilizar la hoja excel en el ordenador de teletrabajo. Es por eso por lo que en este foro he planteado el problema desde otro punto de vista, quitando las fórmulas de la hoja auxiliar, ya que por eso método no me valió. Dejo captura de lo que me pasaba (que no es el caso en este tema), aunque pusiera ESFORMULA como comentas no me iba a valer, porque las funciones que contienen están en ingles,, Puedo buscar la traducción?Si, pero me va a dejar de valer para uno de los ordenadores igual. Es por eso que no conviene mezclar lo de un foro con este porque lo he planteado de otra forma aquí. Un saludo!
Por
MANTONIOPM , · publicado el miércoles a las 21:43 2 días
Hola buenas tardes ojala haya alguien que me pueda ayudar, tengo un archivo en el cual tengo un Userform que realiza vaciado de datos en las celdas que indíco y asu vez cálculos. Pero al finalizar no me toma llamar Call Condicional_Else2, cada que pongo otra condición al finalizar no la toma en cuenta. cual será el problema en esta macro?. Saludos.
Sheets("Factura Carta").Activate
Range("C23:M36").Select
Selection.ClearContents
Range("C23").Select
ActiveCell.Offset(0, 0).Value = UserForm14.TextBox2
ActiveCell.Offset(0, 2).Value = UserForm14.TextBox3
ActiveCell.Offset(0, 3).Value = UserForm14.TextBox4
Range("C24").Select
ActiveCell.Offset(0, 0).Value = UserForm14.TextBox8
ActiveCell.Offset(0, 2).Value = UserForm14.TextBox9
ActiveCell.Offset(0, 3).Value = UserForm14.TextBox10
Range("C25").Select
ActiveCell.Offset(0, 0).Value = UserForm14.TextBox14
ActiveCell.Offset(0, 2).Value = UserForm14.TextBox15
ActiveCell.Offset(0, 3).Value = UserForm14.TextBox16
Range("C26").Select
ActiveCell.Offset(0, 0).Value = UserForm14.TextBox20
ActiveCell.Offset(0, 2).Value = UserForm14.TextBox21
ActiveCell.Offset(0, 3).Value = UserForm14.TextBox22
Range("C27").Select
ActiveCell.Offset(0, 0).Value = UserForm14.TextBox26
ActiveCell.Offset(0, 2).Value = UserForm14.TextBox27
ActiveCell.Offset(0, 3).Value = UserForm14.TextBox28
Range("C28").Select
ActiveCell.Offset(0, 0).Value = UserForm14.TextBox32
ActiveCell.Offset(0, 2).Value = UserForm14.TextBox33
ActiveCell.Offset(0, 3).Value = UserForm14.TextBox34
Range("C29").Select
ActiveCell.Offset(0, 0).Value = UserForm14.TextBox38
ActiveCell.Offset(0, 2).Value = UserForm14.TextBox39
ActiveCell.Offset(0, 3).Value = UserForm14.TextBox40
Range("C30").Select
ActiveCell.Offset(0, 0).Value = UserForm14.TextBox44
ActiveCell.Offset(0, 2).Value = UserForm14.TextBox45
ActiveCell.Offset(0, 3).Value = UserForm14.TextBox46
Range("C31").Select
ActiveCell.Offset(0, 0).Value = UserForm14.TextBox50
ActiveCell.Offset(0, 2).Value = UserForm14.TextBox51
ActiveCell.Offset(0, 3).Value = UserForm14.TextBox52
Range("C32").Select
ActiveCell.Offset(0, 0).Value = UserForm14.TextBox56
ActiveCell.Offset(0, 2).Value = UserForm14.TextBox57
ActiveCell.Offset(0, 3).Value = UserForm14.TextBox58
Range("C33").Select
ActiveCell.Offset(0, 0).Value = UserForm14.TextBox62
ActiveCell.Offset(0, 2).Value = UserForm14.TextBox63
ActiveCell.Offset(0, 3).Value = UserForm14.TextBox64
Range("C34").Select
ActiveCell.Offset(0, 0).Value = UserForm14.TextBox68
ActiveCell.Offset(0, 2).Value = UserForm14.TextBox69
ActiveCell.Offset(0, 3).Value = UserForm14.TextBox70
Range("C35").Select
ActiveCell.Offset(0, 0).Value = UserForm14.TextBox74
ActiveCell.Offset(0, 2).Value = UserForm14.TextBox75
ActiveCell.Offset(0, 3).Value = UserForm14.TextBox76
Range("C36").Select
ActiveCell.Offset(0, 0).Value = UserForm14.TextBox80
ActiveCell.Offset(0, 2).Value = UserForm14.TextBox81
ActiveCell.Offset(0, 3).Value = UserForm14.TextBox82
If TextBox5 = "" Then
Range("M23").Value = UserForm14.TextBox5.Value
ElseIf TextBox5 >= 0 Then
Range("M23").Select
ActiveCell.FormulaR1C1 = UserForm14.TextBox5 / 1.16
If TextBox11 = "" Then
Range("M24").Value = UserForm14.TextBox11.Value
ElseIf TextBox11 >= 0 Then
Range("M24").Select
ActiveCell.FormulaR1C1 = UserForm14.TextBox11 / 1.16
If TextBox17 = "" Then
Range("M25").Value = UserForm14.TextBox17.Value
ElseIf TextBox17 >= 0 Then
Range("M25").Select
ActiveCell.FormulaR1C1 = UserForm14.TextBox17 / 1.16
If TextBox23 = "" Then
Range("M26").Value = UserForm14.TextBox23.Value
ElseIf TextBox23 >= 0 Then
Range("M26").Select
ActiveCell.FormulaR1C1 = UserForm14.TextBox23 / 1.16
If TextBox29 = "" Then
Range("M27").Value = UserForm14.TextBox29.Value
ElseIf TextBox29 >= 0 Then
Range("M27").Select
ActiveCell.FormulaR1C1 = UserForm14.TextBox29 / 1.16
If TextBox35 = "" Then
Range("M28").Value = UserForm14.TextBox35.Value
ElseIf TextBox35 >= 0 Then
Range("M28").Select
ActiveCell.FormulaR1C1 = UserForm14.TextBox35 / 1.16
If TextBox41 = "" Then
Range("M29").Value = UserForm14.TextBox41.Value
ElseIf TextBox41 >= 0 Then
Range("M29").Select
ActiveCell.FormulaR1C1 = UserForm14.TextBox41 / 1.16
If TextBox47 = "" Then
Range("M30").Value = UserForm14.TextBox47.Value
ElseIf TextBox47 >= 0 Then
Range("M30").Select
ActiveCell.FormulaR1C1 = UserForm14.TextBox47 / 1.16
If TextBox53 = "" Then
Range("M31").Value = UserForm14.TextBox53.Value
ElseIf TextBox53 >= 0 Then
Range("M31").Select
ActiveCell.FormulaR1C1 = UserForm14.TextBox53 / 1.16
If TextBox59 = "" Then
Range("M32").Value = UserForm14.TextBox59.Value
ElseIf TextBox59 >= 0 Then
Range("M32").Select
ActiveCell.FormulaR1C1 = UserForm14.TextBox59 / 1.16
If TextBox65 = "" Then
Range("M33").Value = UserForm14.TextBox65.Value
ElseIf TextBox65 >= 0 Then
Range("M33").Select
ActiveCell.FormulaR1C1 = UserForm14.TextBox65 / 1.16
If TextBox71 = "" Then
Range("M34").Value = UserForm14.TextBox71.Value
ElseIf TextBox71 >= 0 Then
Range("M34").Select
ActiveCell.FormulaR1C1 = UserForm14.TextBox71 / 1.16
If TextBox77 = "" Then
Range("M35").Value = UserForm14.TextBox77.Value
ElseIf TextBox77 >= 0 Then
Range("M35").Select
ActiveCell.FormulaR1C1 = UserForm14.TextBox77 / 1.16
If TextBox83 = "" Then
Range("M36").Value = UserForm14.TextBox83.Value
ElseIf TextBox83 >= 0 Then
Range("M36").Select
ActiveCell.FormulaR1C1 = UserForm14.TextBox83 / 1.16
Exit Sub
End If
Exit Sub
End If
Exit Sub
End If
Exit Sub
End If
Exit Sub
End If
Exit Sub
End If
Exit Sub
End If
Exit Sub
End If
Exit Sub
End If
Exit Sub
End If
Exit Sub
End If
Exit Sub
End If
Exit Sub
End If
Exit Sub
End If
Call Condicional_Else2
End Sub