Help to define a Function. Easy for those who know how to do

Actuariojf

New Member
Joined
Aug 29, 2002
Messages
15
Hello everybody,

I would like to build a "simple" function, something like MAT(x,y,z), where the values of x and y are single cells addresses and z is an integer, so if I calculate for example MAT(N12,L12,z) the function does the following:

SUMPRODUCT($N$12:INDIRECT(ADDRESS(ROW($N$12)+Z-1,COLUMN($N$12))),N(OFFSET($L$12,ROW($L$12)+ROWS($L$12:INDIRECT(ADDRESS(ROW($L$12)+Z-1,COLUMN($L$12))))-ROW($L$12:INDIRECT(ADDRESS(ROW($L$12)+V12-1,COLUMN($L$12))))-1,0)))

I do not know how to define or dim or setup the variables to do that. Can somebody help me?

Thanks!

Actuariojf
This message was edited by Actuariojf on 2002-09-05 10:05
 
This last function also works great!. Thanks a lot to all of you. I have learned a lot just for asking a few questions. From now on I will be visiting mrexcel.com more often.

Thanks!

Actuariojf
 
Upvote 0

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.

Forum statistics

Threads
1,215,227
Messages
6,123,745
Members
449,116
Latest member
alexlomt

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