Funcion con Matrices

oscar_igor

New Member
Joined
Apr 7, 2003
Messages
22
Buenas Tardes a Todos: Tengo la siguiente funcion

Public Function tasaponderada(ByVal Monto1 As Single, ByVal monto2 As Single) As Double
Dim Total As Double

total = Monto1 + monto2
total = total / 2
tasaponderada = total

End Function

La pregunta es como lograr que monto1 y monto2 sean un conjunto de valores que estan en una matriz; por ejemplo Matriz1 es de a1 a a15 y matriz2 de b1 a B15.
Se que se puede resolver anidando esta funcion, pero mas bien lo que quiero saber es como en una funcion se puede tomar una matriz.

Saludos a todos.
Mil gracias de antemano
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
ESTE ES UN EJEMPLO, LO QUE QUIERO HACER ES PONDERAR UNA TASA DE ACUERDO AL MONTO INVERTIDO, ES DECIR EN LA COLUMNA A TENGO LOS MONTOS EN LA B TENGO LAS TASAS; AHORA LA CANTIDAD DE MONTOS Y TASAS VAN CAMBIANDO SEGUN EL DIA, POR LO QUE QUIERO PONERLOS EN UNA MATRIZ PARA QUE VAYAN CAMBIANDO (COMO EL EJEMPLO DE LISTA DINAMICA).
SALUDOS
 
Upvote 0
EN TERMINOS DE EXCEL SI TUVIERA DOS MONTOS Y DOS TASAS LO QUE TENDRIA QUE HACER ES:

=((A1*B1)+(A2*B2))/SUMA(A1:A2)

EL PROBLEMA ESTA CUANDO SON N TASAS Y N MONTOS, OBVIAMENTE EL NUMERO DE TASAS = AL NUMERO DE MONTOS (CANTIDAD DE DATOS)

ESPERO QUE ALGUIEN ME PUEDA AYUDAR.
SALUDOS
 
Upvote 0
ANALIZANDO ESTE PUNTO TAMPOCO SE PUEDE RESOLVER CON MATRICES NI CON LA FUNCION:
=Hoja1!$A$1:INDICE(Hoja1!$A:$A,COINCIDIR(REPETIR("z",255),Hoja1!$A:$A))

POR QUE TENDRIA QUE HACER UNA MATRIZ POR CADA DIA, MAS BIEN LO QUE BUSCO ES COMO INSERTAR EN LA FUNCION PARA QUE ME PERMITE PONER UN RANGO.
SALUDOS
 
Upvote 0

Forum statistics

Threads
1,215,112
Messages
6,123,162
Members
449,099
Latest member
afishi0nado

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top