Howdy. I'm trying to set a range variable ('IngFore') as equal to a number of rows long and a number of columns wide via 'Cells'. The range needs to be dynamic in that the total number of rows and columns will vary over time. Hence, I've defined 'lastdate' to determine the last row in the array, and 'lastcol' to determine the last column in the array. The starting point for the array is I12.
It would appear that I can't quite get the syntax right. Can anyone give me a hand?
I've tinkered with it here and there, removing and adding brackets but I can't get it to work
It would appear that I can't quite get the syntax right. Can anyone give me a hand?
Code:
Set IngFore = (Cells(12,9 to lastdate,9)),(Cells(12, 9 to 12, lastcol))
I've tinkered with it here and there, removing and adding brackets but I can't get it to work