L
lothario
Hi,
In the following code the data in every row from columns i:L from the
current sheet is copied to the OnlyData sheet if there are any entries
in column F of the current sheet.
------------------------------------------------------------------------
Dim range2_for_the_OnlyData As Range
Set range2_for_the_OnlyData =
Columns("f").SpecialCells(xlCellTypeConstants).EntireRow
Set range2_for_the_OnlyData = Intersect(range2_for_the_OnlyData,
Range("i:L"))
range2_for_the_OnlyData.Copy
Sheets("OnlyData").Range("j25").PasteSpecial xlPasteValues
Application.CutCopyMode = False
--------------------------------------------------------------------------
But this works only if I have data in columns i:L.
If there are functions, etc then the above code does not work.
How do I change the above code to ensure that ALL the data (in
columns i:L) gets copied from the current sheet to the OnlyData
sheet if there are any entries in column F of the current sheet.
In other words, the results of all functions should be copied and
not the functions themselves.
Thanks.
In the following code the data in every row from columns i:L from the
current sheet is copied to the OnlyData sheet if there are any entries
in column F of the current sheet.
------------------------------------------------------------------------
Dim range2_for_the_OnlyData As Range
Set range2_for_the_OnlyData =
Columns("f").SpecialCells(xlCellTypeConstants).EntireRow
Set range2_for_the_OnlyData = Intersect(range2_for_the_OnlyData,
Range("i:L"))
range2_for_the_OnlyData.Copy
Sheets("OnlyData").Range("j25").PasteSpecial xlPasteValues
Application.CutCopyMode = False
--------------------------------------------------------------------------
But this works only if I have data in columns i:L.
If there are functions, etc then the above code does not work.
How do I change the above code to ensure that ALL the data (in
columns i:L) gets copied from the current sheet to the OnlyData
sheet if there are any entries in column F of the current sheet.
In other words, the results of all functions should be copied and
not the functions themselves.
Thanks.