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.

A1-
A2-
A3-
IDNameInitial CheckCheckStatT/F Check
1ScienceScienceTrue
2MathHistoryFalse
3HistoryGeoFalse
4MathMathTrue
5ScienceMathFalse
6GeoMathFalse

<tbody>
</tbody>


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

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
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,216,153
Messages
6,129,172
Members
449,490
Latest member
TheSliink

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