Using an VBA & arrays to do calculatiuons

Q

QuietMan

All,

Hoping that someone can help me with this... (mth = revenue amount for that
month)

here is formula used to calculate constant currency for the quarter
=(Mth1*CRate Mth1/PRate Mth1)+(Mth2*CRate Mth2/PRate Mth2)+(Mth3*CRate
Mth3/Rate Mth3)

I would like to use VBA to calculate the results for Q1 to Q4...QTD, BOY,
and YTD (changes based on current month) and return the excel worksheet thus
saving me 72+ columns of information

does any one know how I can use arrays to hould the values and return them
to the work sheet...

I'm really look at how conceptually I would get started with this

Thanks
 
J

joel

On worksheet select cells A1:G1

{=getArray()}


The enter formula above typing shift-ctrl-enter instead of typing brackets
(array formula)

Below is the VBA code.

Function Getarray()
MyArray = Array(1, 2, 3, 4, 5, 6, 7)
Getarray = MyArray

End Function
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top