Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to create a range in VBA in a similar fashion to the worksheet
function OFFSET. E.g.. =Offset(MyNamedRange,10,1,0,-5) Which would give me a 10 x 1 range, 5 columns to the left of "MyNamedRange" (which is a single cell). How would I do this in VBA? I intend to use this range and another range in the VBA 'Intersect' function to create a third range. My expereimental code is something like this (after declaring and setting the various variables)... TestVals = Application.Offset(Cyc.Range("CurrentPowerDist"), 0, -6, r, 0) MaxVal = Cyc.Range("CurrentPowerDist").Offset(-2, -6) MaxRng = Intersect(TestVals, MaxVal) Thanks Nick |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Compare Cell Values, Offset(-1,0), Offset(-1,-1), and xlFillDefaul | Excel Worksheet Functions | |||
Compare Cell Values, Offset(-1,0), Offset(-1,-1), and xlFillDefaul | Excel Programming | |||
Find, Copy offset to offset on other sheet, Run-time 1004. | Excel Programming | |||
Equivalent Of VAL | Excel Programming | |||
VBA equivalent of MATCH() | Excel Programming |