Thread
:
Range naming
View Single Post
#
4
Posted to microsoft.public.excel.programming
Don Guillett[_4_]
external usenet poster
Posts: 2,337
Range naming
Could it be that you are using offset with col,row instead of row,col?
--
Don Guillett
SalesAid Software
"BigJim" wrote in message
...
Thanks. My problem is with the syntax of the
"rSource = " line below.
dim iNoRows as integer
dim rSrc as range
iNoRows = 8
dim iColNo as integer
for iColNo=1 to 24
rSrc = range(range("MyScores").offset(iColNo, 1),
range("MyScores").offset(iColNo, iNoRows))
-----Original Message-----
Can anyone point me to help topics on named ranges. I
cannot find the syntax to set the rSource and rDest
variables below.
My puzzle has two arrays, an array of scores and an
array
of results seperated by several rows of blank rows.
Each array has a name in the top-left cell (NS_Scores,
NS_Percentages) and each array is approx 8 rows * 32
columns. Both the widh and height will be variable once
I
have better control of the code.
I want to apply a user-defined function to populate the
results array (one column at a time) from the Scores
array.
How do I pass references to individual columns of the
two
arrays to the user defined function?
Public CalcPercentage (rSource as range, rDest as range)
as boolean
' some logic to produce the Dest array from the
Source.
exit function
....
dim rSource as range
dim i as integer
dim iNoRows as integer
iNoRows = 8
for i=1 to 24
rSource = range(range("MyScores").offset(i, col),
range("MyScores").offset(iNoRows, col))
rDest = range(rSource).offset("MyPercentage"))
dim bResult as boolean
bResult = CalcPercentage (rSource, rDest)
next i
....
.
Reply With Quote
Don Guillett[_4_]
View Public Profile
Find all posts by Don Guillett[_4_]