Estimados,
Junto con saludar, tengo la siguiente consulta:
Cree esta formula en F4, =SUMA(FILTRAR(C2:C199;AÑO($A$2:$A$199)=AÑO(C1))) que suma valores de una tabla en función del AÑO ubicado en C1 y ubicado en A2:A199 (ver excel adjunto).
Lo que necesito ahora, es que los valores contenidos en C2:C199 que tienen una Moneda en la columna B2:B199 que puede ser EUR o USD, tenga conversión de valor en función de una tabla auxiliar ubicada en E9:H11.
El resultado esperado sería 160.000.
Saludos y de antemano, muchas gracias!Ejemplo sumar con Tipo de cambio.xlsx
Por
Matías86, · publicado
Hola amig@s
Tengo un problema que no doy con el.
En el códigos siguiente, el Setfocus no “funciona”…
¿Qué estoy haciendo mal?...
De repente estoy trancado en alguna tontería pero ya “no veo” ja!.
Me podrias ayudar?
Gracias de antemano.
Private Sub cmdAceptar_click()
Application.ScreenUpdating = False
If Trim(Me.txt_fecha) = Empty Then
Me.txt_fecha.BackColor = &HC0C0FF
MsgBox "Debe ingresar la fecha de la operación", , "CAMPO VACIO"
Me.txt_fecha.SetFocus
Me.txt_fecha.SelStart = 0
Exit Sub
ElseIf Trim(Me.txt_Descripcion) = "" Then
Me.txt_Descripcion.BackColor = &HC0C0FF
MsgBox "Detalle la operacion", , "CAMPO VACIO"
Me.txt_Descripcion.SetFocus
Me.txt_Descripcion.SelStart = 0
Exit Sub
ElseIf me.cbx_Naturaleza = "" Then
Me.cbx_Naturaleza.BackColor = &HC0C0FF
MsgBox "Seleccione Naturaleza de la operación", , "CAMPO VACIO"
Me.cbx_Naturaleza.SetFocus
Me.cbx_Naturaleza.SelStart = 0
Exit Sub
ElseIf Me.cbx_Operacion = "" Then
Me.cbx_Operacion.BackColor = &HC0C0FF
MsgBox "Seleccione tipo de Operacion", , "CAMPO VACIO"
Me.cbx_Operacion.SetFocus
Me.cbx_Operacion.SelStart = 0
Exit Sub
ElseIf Me.cbx_Fondo = "" Then
Me.cbx_Fondo.BackColor = &HC0C0FF
MsgBox "Seleccione Fondo afectado", , "CAMPO VACIO"
Me.cbx_Fondo.SetFocus
Me.cbx_Fondo.SelStart = 0
Exit Sub
ElseIf Me.txt_Importe = "" Then
Me.txt_Importe.BackColor = &HC0C0FF
MsgBox "Ingrese el Importe", , "CAMPO VACIO"
Me.txt_Importe.SetFocus
Me.txt_Importe.SelStart = 0
Exit Sub
ElseIf Not IsDate(Me.txt_fecha.Value) Then 'verifica que sea una fecha valida
Me.txt_fecha.BackColor = &HC0C0FF
MsgBox "Fecha invalida.", vbCritical, " ERROR !"
Me.txt_fecha.SetFocus
Me.txt_fecha.SelStart = 0
Exit Sub
ElseIf Me.cbx_Naturaleza.Text = "Egresos" And Me.txt_Importe.Value > 0 Then
Me.txt_Importe.BackColor = &HC0C0FF
MsgBox "Debe ser importe negativo", vbCritical, " ERROR !"
Me.txt_Importe.SetFocus
Me.txt_Importe.SelStart = 0
Exit Sub
ElseIf Me.cbx_Naturaleza.Text = "Ingresos" And Me.txt_Importe.Value < 0 Then
Me.txt_Importe.BackColor = &HC0C0FF
MsgBox "Debe ser importe positivo", vbCritical, " ERROR !"
Me.txt_Importe.SetFocus
Me.txt_Importe.SelStart = 0
Exit Sub
End If