Filter and Copying of Data on Another Sheet

unknownymous

Board Regular
Joined
Sep 19, 2017
Messages
249
Office Version
  1. 2016
Platform
  1. Windows
Hello Guys,

So I have below data on Sheet1 with a range A4:BC. What if I want to Filter all those that returned as "FALSE" (in T/F Check Column) and copy those related columns namely "Inital Check", "Check', & "T/F Check" on another tab sheet named "Check" in range E1:G1.

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]A1[/TD]
[TD]-[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A2[/TD]
[TD]-[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A3[/TD]
[TD]-[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]ID[/TD]
[TD]Name[/TD]
[TD]Initial Check[/TD]
[TD]Check[/TD]
[TD]Stat[/TD]
[TD]T/F Check[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD][/TD]
[TD]Science[/TD]
[TD]Science[/TD]
[TD][/TD]
[TD]True[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][/TD]
[TD]Math[/TD]
[TD]History[/TD]
[TD][/TD]
[TD]False[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[TD]History[/TD]
[TD]Geo[/TD]
[TD][/TD]
[TD]False[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD][/TD]
[TD]Math[/TD]
[TD]Math[/TD]
[TD][/TD]
[TD]True[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD][/TD]
[TD]Science[/TD]
[TD]Math[/TD]
[TD][/TD]
[TD]False[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD][/TD]
[TD]Geo[/TD]
[TD]Math[/TD]
[TD][/TD]
[TD]False[/TD]
[/TR]
</tbody>[/TABLE]


I have more than 10K lines so this will be a great help once solved. Thank you! :)
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
How about
Code:
Sub CopyFalse()

   Dim Rng As Range
   With Sheets("Sheet1").Range("F4", Sheets("Sheet1").Range("F" & Rows.Count).End(xlUp))
      .Replace True, "=xxx", xlWhole, , False, , False, False
      Set Rng = .SpecialCells(xlConstants, xlLogical)
      .Replace "=xxx", True, xlWhole, , False, , False, False
   End With
   Intersect(Rng.EntireRow, Sheets("Sheet1").Range("C:D,F:F")).Copy Sheets("Check").Range("E1")
End Sub
 
Upvote 0
Thanks Fluff however I'm getting this error "runtime error 1004 no cells were found" possibly because some cell in "Check" column were left as blank.
 
Upvote 0
How about
Code:
Sub CopyFalse()

   Dim Rng As Range
   With Sheets("Sheet1").Range("F4", Sheets("Sheet1").Range("F" & Rows.Count).End(xlUp))
      .Replace True, "=xxx", xlWhole, , False, , False, False
      Set Rng = .SpecialCells(xlConstants)
      .Replace "=xxx", True, xlWhole, , False, , False, False
   End With
   Intersect(Rng.EntireRow, Sheets("Sheet1").Range("C:D,F:F")).Copy Sheets("Check").Range("E1")
End Sub
 
Upvote 0

Forum statistics

Threads
1,225,735
Messages
6,186,716
Members
453,369
Latest member
positivemind

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