Hi Jim & bob,
I used both of your code, it is pasting over the same columns. I a
asking it to find the next empty col. and paste.
Here is my code:
Sub mycode12()
Dim c As Range
Dim rRng As Range
'Dim lastRow As Long
Dim count As Long
Dim lastcol As Long
'Formula Worksheets(1).Range("a2") = Mid(CELL("filename", A1)
Find("]", CELL("filename", A1)) + 1, 255)
With Worksheets(1).Range("A2").Select
ActiveCell.FormulaR1C1 = _
"=MID(CELL(""filename"",R[-3]C[-6]),FIND(""["",CELL(""filename"",R[-3]C[-6]))+1,FIND(""]"",CELL(""filename"",R[-3]C[-6]))-FIND(""["",CELL(""filename"",R[-3]C[-6]))-1)"
With Worksheets(1).Range("A:A")
Set c = .Find("Ave", LookIn:=xlValues)
If Not c Is Nothing Then
.Range("A1:E" & c.Row - 1).Copy
End If
End With
Windows("DataAll.xls").Activate
With Worksheets("Sheet2")
lastcol = .Range("A1").End(xlToRight).Column
.Cells(lastColumn + 1, 1).PasteSpecial Paste:=xlValues _
, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
count = 5
Do
If Application.Range("B" & count) = "Orifice Axis 1" Then
Application.Range("B" & count).Select
Selection.EntireRow.Delete
End If
count = count + 1
Loop Until Application.Range("B" & count).Value = ""
End With
End With
End Sub
Thanks
Sye