Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I know this is a simple thing but I can't make the syntax work. I am passed a range into a
function that is 3 columns wide and some variable number of rows long. The For loop is just trying to run through each of the rows in the range and pull the values from the 3 columns in each row into variables to do some calculations. Function WAR(Sel As Range) As Double Y = Sel.Rows.Count For i = 0 To (Y - 1) A = Sel.Offset(i, 0).Value B = Sel.Offset(i, 1).Value C = Sel.Offset(i, 2).Value Use values... Next i .... But this is not working. Can I not use Offset(x,y) to move around within the range Sel? If not, now do I reference values at a given x,y coordinate within the range? Thanks. John Black |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Sum part of range passed to UDF | Excel Programming | |||
dynamic range based on criteria, within a dynamic range, passed to a function | Excel Programming | |||
Modify range variable passed through Function | Excel Programming | |||
Excel2000: Reading values from range, passed to function as parameter using an expression | Excel Programming | |||
Translate range name passed as string to a custom function to range addresses! | Excel Programming |