ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Using an VBA & arrays to do calculatiuons (https://www.excelbanter.com/excel-programming/427467-using-vba-arrays-do-calculatiuons.html)

Quietman

Using an VBA & arrays to do calculatiuons
 
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

joel

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



All times are GMT +1. The time now is 05:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com