I have been searching for this for a while now and I have not been successful.
I am trying to use range with cells command in VBA, and the last row is variable. Moreover, I am not getting consecutive columns.
I have to select range S2:S9
and U2:U9
(as already said, last row can be variable). I know this command works:
Range(Cells(2, 19), Cells(NumberofRows, 19)).select
But I need to select 2 different columns that are not consecutive. I am trying something like this but no success:
Range(Cells(2, 19), Cells(NumLinhas, 19);(Cells(2, 21), Cells(NumLinhas, 21)).Select
Does anyone know how to do it?