I found this code and I am using it to copy a data set of unknown length:
LastRow = Range(col & Rows.Count).End(xlUp).Row
Can someone help me write something similar for a data set of unknown width? I need something that will find the last column. I've tried this:
LastCol = Range(Columns.Count & row).End(xlLeft).Column
or/and
LastCol = Range(Columns.Count & row).End(xlRight).Column
but for some reason it isn't working. Is my problem with this code or is it somewhere else in my macro? Should either of these work? In advance, thanks!
LastRow = Range(col & Rows.Count).End(xlUp).Row
Can someone help me write something similar for a data set of unknown width? I need something that will find the last column. I've tried this:
LastCol = Range(Columns.Count & row).End(xlLeft).Column
or/and
LastCol = Range(Columns.Count & row).End(xlRight).Column
but for some reason it isn't working. Is my problem with this code or is it somewhere else in my macro? Should either of these work? In advance, thanks!