I need to look at two cells (C and F) on a each row, and if the value for C to ends with 30 and the value for F is greater than Zero, copy and paste the row to another sheet. I've managed to get the copy and paste to work using 1 criteria, but I cannot figure out how to get both criteria to work together.
Code:
[/FONT][/COLOR][COLOR=#101094][FONT=Consolas]Sub[/FONT][/COLOR][COLOR=#303336][FONT=Consolas] compile1[/FONT][/COLOR][COLOR=#303336][FONT=Consolas]()[/FONT][/COLOR]
<code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; white-space: inherit;">[COLOR=#303336] [/COLOR][COLOR=#101094]Dim[/COLOR][COLOR=#303336] x [/COLOR][COLOR=#101094]As[/COLOR][COLOR=#303336] [/COLOR][COLOR=#101094]String[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#101094]Dim[/COLOR][COLOR=#303336] y [/COLOR][COLOR=#101094]As[/COLOR][COLOR=#303336] [/COLOR][COLOR=#101094]Integer[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#101094]Set[/COLOR][COLOR=#303336] rSearch [/COLOR][COLOR=#303336]=[/COLOR][COLOR=#303336] Sheets[/COLOR][COLOR=#303336]([/COLOR][COLOR=#7D2727]"Application"[/COLOR][COLOR=#303336]).[/COLOR][COLOR=#303336]Range[/COLOR][COLOR=#303336]([/COLOR][COLOR=#7D2727]"C:c"[/COLOR][COLOR=#303336])[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#101094]Set[/COLOR][COLOR=#303336] rSearch1 [/COLOR][COLOR=#303336]=[/COLOR][COLOR=#303336] Sheets[/COLOR][COLOR=#303336]([/COLOR][COLOR=#7D2727]"Application"[/COLOR][COLOR=#303336]).[/COLOR][COLOR=#303336]Range[/COLOR][COLOR=#303336]([/COLOR][COLOR=#7D2727]"F:F"[/COLOR][COLOR=#303336])[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#858C93]'x = rSearch.Cell.Value[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#858C93]'y = rSearch1.Value[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#101094]For[/COLOR][COLOR=#303336] [/COLOR][COLOR=#101094]Each[/COLOR][COLOR=#303336] cell [/COLOR][COLOR=#101094]In[/COLOR][COLOR=#303336] rSearch
x [/COLOR][COLOR=#303336]=[/COLOR][COLOR=#303336] cell[/COLOR][COLOR=#303336].[/COLOR][COLOR=#303336]Value
[/COLOR][COLOR=#101094]If[/COLOR][COLOR=#303336] Right[/COLOR][COLOR=#303336]([/COLOR][COLOR=#303336]x[/COLOR][COLOR=#303336],[/COLOR][COLOR=#303336] [/COLOR][COLOR=#7D2727]2[/COLOR][COLOR=#303336])[/COLOR][COLOR=#303336] [/COLOR][COLOR=#303336]=[/COLOR][COLOR=#303336] [/COLOR][COLOR=#7D2727]"30"[/COLOR][COLOR=#303336] [/COLOR][COLOR=#101094]Then[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#101094]For[/COLOR][COLOR=#303336] [/COLOR][COLOR=#101094]Each[/COLOR][COLOR=#303336] cell1 [/COLOR][COLOR=#101094]In[/COLOR][COLOR=#303336] rSearch1
y [/COLOR][COLOR=#303336]=[/COLOR][COLOR=#303336] cell1[/COLOR][COLOR=#303336].[/COLOR][COLOR=#303336]Value
[/COLOR][COLOR=#101094]If[/COLOR][COLOR=#303336] y [/COLOR][COLOR=#303336]>[/COLOR][COLOR=#303336] [/COLOR][COLOR=#7D2727]0[/COLOR][COLOR=#303336] [/COLOR][COLOR=#101094]Then[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#858C93]' If Right(x, 2) = "30" And y > 0 Then[/COLOR][COLOR=#303336]
matchRow [/COLOR][COLOR=#303336]=[/COLOR][COLOR=#303336] cell[/COLOR][COLOR=#303336].[/COLOR][COLOR=#303336]Row
Rows[/COLOR][COLOR=#303336]([/COLOR][COLOR=#303336]matchRow [/COLOR][COLOR=#303336]&[/COLOR][COLOR=#303336] [/COLOR][COLOR=#7D2727]":"[/COLOR][COLOR=#303336] [/COLOR][COLOR=#303336]&[/COLOR][COLOR=#303336] matchRow[/COLOR][COLOR=#303336]).[/COLOR][COLOR=#101094]Select[/COLOR][COLOR=#303336]
Selection[/COLOR][COLOR=#303336].[/COLOR][COLOR=#303336]Copy
Sheets[/COLOR][COLOR=#303336]([/COLOR][COLOR=#7D2727]"sheet2"[/COLOR][COLOR=#303336]).[/COLOR][COLOR=#101094]Select[/COLOR][COLOR=#303336]
ActiveSheet[/COLOR][COLOR=#303336].[/COLOR][COLOR=#303336]Rows[/COLOR][COLOR=#303336]([/COLOR][COLOR=#303336]matchRow[/COLOR][COLOR=#303336]).[/COLOR][COLOR=#101094]Select[/COLOR][COLOR=#303336]
ActiveSheet[/COLOR][COLOR=#303336].[/COLOR][COLOR=#303336]Paste
Sheets[/COLOR][COLOR=#303336]([/COLOR][COLOR=#7D2727]"Application"[/COLOR][COLOR=#303336]).[/COLOR][COLOR=#101094]Select[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#101094]End[/COLOR][COLOR=#303336] [/COLOR][COLOR=#101094]If[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#101094]Next[/COLOR][COLOR=#303336]
[/COLOR]</code>[COLOR=#101094][FONT=Consolas]End[/FONT][/COLOR][COLOR=#303336][FONT=Consolas] [/FONT][/COLOR][COLOR=#101094][FONT=Consolas]Sub[/FONT][/COLOR][COLOR=#242729][FONT=Arial]