Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
declare multiple variables
hi,
is there any way i can declare multiple variables at the same time without creating tons of different functions. for example, lets say i have: Function zum() As Variant Application.Volatile zum = 0 For Each w In Worksheets zum = zum + w.Range("C2").Value Next End Function i want to be able to modify it to something like: Function zum() As Variant Application.Volatile zum = 0 For Each w In Worksheets zum = zum + w.Range("C2").Value zum2 = zum2 + w.Range("D2").Value zum3 = zum3 + w.Range("F2").Value Next End Function how should I modify it? thanks in advance, geebee |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Declare variables to a code? | Excel Discussion (Misc queries) | |||
Declare Variables in Array | Excel Discussion (Misc queries) | |||
Declare and Set Public variables | Excel Discussion (Misc queries) | |||
How to efficiently declare variables | Excel Discussion (Misc queries) | |||
Best place to declare variables | Excel Programming |