Thread
:
copy rows in range if data in first cell
View Single Post
#
4
Posted to microsoft.public.excel.programming
michdenis
external usenet poster
Posts: 135
copy rows in range if data in first cell
If you want Text and numerical stemming from formula
'-------------------------------
Sub test()
Dim Rg As Range
On Error Resume Next
With Sheet1
With .Range("A1:A" & .Range("A65536").End(xlUp).Row)
Set Rg = .SpecialCells(xlCellTypeFormulas, 3)
End With
End With
Rg.EntireRow.Copy Sheet2.Range("A1")
End Sub
'-------------------------------
"michdenis" a écrit dans le message de groupe de discussion :
...
Hi,
For cells containing Text only
'---------------------------
Sub test()
Dim Rg As Range
On Error Resume Next
With Sheet1
With .Range("A1:A" & .Range("A65536").End(xlUp).Row)
Set Rg = .SpecialCells(xlCellTypeFormulas, xlTextValues)
End With
End With
Rg.EntireRow.Copy Sheet2.Range("A1")
End Sub
'---------------------------
"Wes_A" a écrit dans le message de groupe de discussion :
...
I need to select from a range of rows - only those having data (formula
result) in the first cell. There will be some rows without data in the first
cell but they would contain a formula - these shoudl not be selected for copy.
I want to select and copy all the rows having data in the first cell in
order to paste these rows as values into a separate sheet in another workbook.
Any suggestion?
Reply With Quote
michdenis
View Public Profile
Find all posts by michdenis