Help with look up and row paste

jedibrown

Board Regular
Joined
Oct 17, 2011
Messages
136
Hi,

Basically, I am creating some data and I am a bit stuck.

I would like to say:

If any cells in column c have the word "Giant" in it (there will be a sentance in each cell but I would like it to pick out the specific word) - Then please paste the whole line into sheet 2.

Is this possible?

Many thanks
 
Although now this won't work :(

Private Sub CommandButton1_Click()
Dim LR As Long, i As Long
Sheets("Sheet5").UsedRange.ClearContents
LR = Range("C" & Rows.Count).End(xlUp).Row
For i = 1 To LR
If Not IsError(Range("b" & i)) And Not IsError(Range("G" & i)) Then
If (LCase(Range("C" & i).Value) = "incident" Or LCase(Range("C" & i).Value) = "problem") And _
LCase(Range("c" & i).Value) <> "complete" And _
LCase(Range("c" & i).Value) <> "rejected" And _
LCase(Range("c" & i).Value) <> "testing" And _
LCase(Range("c" & i).Value) <> "fixed" And _
LCase(Range("c" & i).Value) <> "signoff" And _
LCase(Range("c" & i).Value) <> "release" _
Then Rows(i).Copy Destination:=Sheets("Sheet5").Range("A" & Rows.Count).End(xlUp).Offset(1)
End If
Next i
End Sub
 
Upvote 0

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Maybe

Code:
Private Sub CommandButton1_Click()
Dim LR As Long, i As Long
Sheets("Sheet5").UsedRange.ClearContents
LR = Range("C" & Rows.Count).End(xlUp).Row
For i = 1 To LR
    If Not IsError(Range("C" & i)) And Not IsError(Range("G" & i)) Then
        If LCase(Range("C" & i).Value) = "incident" Or LCase(Range("C" & i).Value) = "problem" Then
            If LCase(Range("c" & i).Value) <> "complete" And _
            LCase(Range("c" & i).Value) <> "rejected" And _
            LCase(Range("c" & i).Value) <> "testing" And _
            LCase(Range("c" & i).Value) <> "fixed" And _
            LCase(Range("c" & i).Value) <> "signoff" And _
            LCase(Range("c" & i).Value) <> "release" _
            Then Rows(i).Copy Destination:=Sheets("Sheet5").Range("A" & Rows.Count).End(xlUp).Offset(1)
        End If
    End If
Next i
End Sub
 
Upvote 0
Good morning - I just wondered if I could ask for your help again please on a similar issue to this just with different variables?
 
Upvote 0

Forum statistics

Threads
1,223,240
Messages
6,170,951
Members
452,368
Latest member
jayp2104

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top