View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Using an VBA & arrays to do calculatiuons

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

"QuietMan" wrote:

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
--
Helping Is always a good thing