Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Greeting,
I'm trying to use an array to complete a task. The following code is what I have thus far, but get an error on the 2nd line (OSRCount is the array). I need to make this loop work for each item in the arraym but don't really know how to do that. -----Function-------------------------- For Each OSRCount In OSRList Do While RowEnd < RowEnd + (2 * OSRCount / 3) Range(Cells(RowStart, ColumnStart), Cells(RowEnd, ColumnStart + 2)).Select Selection.Cut Range(Cells(RowStart - OSRCount / 3, ColumnStart + 5), Cells(RowStart - OSRCount / 3, ColumnStart + 5)).Select ActiveSheet.Paste Application.CutCopyMode = False RowStart = RowStart + Round(2 * (OSRCount / 3)) RowEnd = RowEnd + Round(2 * (OSRCount / 3)) ColumnStart = ColumnStart + 4 Exit For Loop Next ------- Definition of Array -------------------------------- OSRList = Array("BS", "CK", "HS", "IT", "JD", "JW", "KC", "KF", "MG", "MM", "SM", "TS", "VD") For Each OSRCount In OSRList OSRCount = Application.CountIf(Sheets("ALLACCT").Range("B:B") , OSRList) Exit For Next -------------------------------- Any help would be really appreciated!, -m |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Array Question | Excel Discussion (Misc queries) | |||
array question | Excel Programming | |||
Array Question I think | Excel Programming | |||
Array Question | Excel Worksheet Functions | |||
Array Question | Excel Programming |