Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
i'd like some help using an array
let's say i have a lot of these:
lastrow1 = ws1.Cells(42, "AI").End(xlUp).Row lastrow2 = ws1.Cells(42, "B").End(xlUp).Row i want to check to make sure the last row is 3 i thought i might be able to use an array instead of writing an if statement for every one. arr = Array("1","2") For r = LBound(arr) To UBound(arr) If "lastrow" & arr(r) < 3 Then 'code here else code here End If Next but i cant seem to combine them so they return the value of the variable. is it possible or should i take another route? -- Gary |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Prevent cell/array references from changing when altering/moving thecell/array | Excel Discussion (Misc queries) | |||
meaning of : IF(Switch; Average(array A, array B); array A) | Excel Worksheet Functions | |||
Array problem: Key words-Variant Array, single-element, type mismatch error | Excel Programming | |||
Array problem: Key words-Variant Array, single-element, type mismatch error | Excel Programming | |||
variant array containing cel adresses convert to actual ranges-array | Excel Programming |