Hey. i have a dokument with 18 sheets.on 2-16 have produkts that i now can mark with a amount and when this is made it goes into a sum. price and all, just like i wants. As i mark on several sheets i would like to run a MACRO in the end that controls every sheets if theres a number/mark in column J/10 and when it is, COPY and MOVE it to the sheet in the end called ORDERS. I now have a macro thats makes all of ths exept that i have to make a mark X in column F/6!!!! Cant get it moved with my lack of exerience of macros. The MACRO i have at the moment looks likes this:
Code
Sub order()
Dim rCell As Range, lReply As Long, firstaddress As String, ws As Worksheet
Dim rCopyRange As Range
Application.ScreenUpdating = False
For Each ws In Worksheets
On Error Resume Next
If ws.Name <> "Order" Then
Set rCell = ws.Columns(6).Find(What:="x", After:=ws.Range("F1"), LookIn:=xlValues)
Else: Exit For
End If
If Not rCell Is Nothing Then
firstaddress = rCell.Address
Rows(rCell.Row).Activate
Do
If rCopyRange Is Nothing Then
Set rCopyRange = rCell.EntireRow
Else
Set rCopyRange = Union(rCopyRange, rCell.EntireRow)
End If
Set rCell = ws.Columns(6).FindNext(rCell)
Loop While Not rCell Is Nothing And rCell.Address <> firstaddress And rCell.Row > 1
End If
On Error GoTo 0
If Not rCopyRange Is Nothing Then
rCopyRange.Copy Sheets("Order").Range("A65536").End(xlUp)(2)
End If
Set rCopyRange = Nothing
Next
Application.ScreenUpdating = True
End Sub
Display More
(*EDIT* - Note closing code tag is [noparse][/code][/noparse]
Hope to get a answer. Best regards