Hello
I have an array which has a range of data (e.g B2:B10). Because this column can move, and the number of rows are dynamic, I have coded this to have a StartRow, LastRow, and a search of a column number.
The line of code works well, when there are multiple rows (e.g StartRown< Last Row) ie a range from row 2 to 10), but when there is only 1 row of data (e.g StartRow=LastRow ie just row 2) then this line fails.
In this example:
StartRow = 2
LastRow = 2
Column1 = 8
So I would like to full the Field1 array with H2:H2
Can anyone help where I'm going wrong?
Regards
Jay
I have an array which has a range of data (e.g B2:B10). Because this column can move, and the number of rows are dynamic, I have coded this to have a StartRow, LastRow, and a search of a column number.
The line of code works well, when there are multiple rows (e.g StartRown< Last Row) ie a range from row 2 to 10), but when there is only 1 row of data (e.g StartRow=LastRow ie just row 2) then this line fails.
In this example:
StartRow = 2
LastRow = 2
Column1 = 8
So I would like to full the Field1 array with H2:H2
Can anyone help where I'm going wrong?
Regards
Jay