Hello people,
I need a script that loop through all sheets in a open workbook?
if a column first cell (always A1) have value="ordernr"
then
select the whole column
Could someone help me?
I wrote this could but doesn't work
Thank you in advance
I need a script that loop through all sheets in a open workbook?
if a column first cell (always A1) have value="ordernr"
then
select the whole column
Could someone help me?
I wrote this could but doesn't work
Code:
Sub GetData()
Dim s As String
Dim Current As Worksheet
For Each Current In Worksheets
For Each C In ActiveSheet.UsedRange
If C.Value = "Ordernr" Then
Columns(1).Select
'Selection.Copy
'Workbooks("test1").Activate
'ActiveSheet.Name = "Company"
End If
Next
Next
End Sub
Thank you in advance