Hi, I hope you can help with what first appeared to be a simple problem but now has me tearing my hair out.
I have a worksheet with 'columns' of data beginning in row 7 (Row 7 is the header row for the columns).
Rows 1 to 6 has different data.
There can be up to 10,000 values in each 'column' and I need to change format and alignment.
Selecting the excel sheet columns and changing the alignment is fast but is slow if I use a range to select row 8 to last row.
Cells A1:K7 (range can change) has different formats and alignments to the 'columns' in row 8 so must be restored.
The idea is to copy cells A1:K7 (for example), format/align the full columns and restore cells A1:K7
I need cell formats and alignment but may need values and fonts too.
I thought of something like this
Dim MyRange as Range
Dim ws as worksheet
Set MyRange = ReturnRange("A1:A7")
' here I will align the columns in the range for speed (aligning range is slow)
' and want to restore the header cells alignment and formats
call RestoreRange("A1", MyRange) ' restore at top left cell. Range need not be same as when copied.
Any help really appreciated
Thanks
Bookmarks