Excel & VBA: Copy rows into a new sheet based on cell value
I'm a total newbie in Excel and VBA. I have a sheet like this: A B C D someinfo someinfo someinfo OK someinfo someinfo someinfo OK someinfo someinfo someinfo ERROR someinfo someinfo someinfo ERROR someinfo someinfo someinfo OK someinfo someinfo someinfo OK someinfo someinfo someinfo ERROR someinfo someinfo someinfo ERROR Ok I'd like to copy the "OK" lines into a new sheet and the one with "ERROR" into another one. How can I do that? As stated in earlier comments this is how you would Filter~>Copy~>Paste Sub FilterAndCopy() Application.ScreenUpdating = False Application.EnableEvents = False