Hi Everyone,
I need to write a macro that would delete a row if its value in Column(B) is under 500.
Is it possible to do this ?
I need it to be a macro so that it can be part of a much bigger macro.
Thanks everyone !
Love,
Kaitlyn
Hi Everyone,
I need to write a macro that would delete a row if its value in Column(B) is under 500.
Is it possible to do this ?
I need it to be a macro so that it can be part of a much bigger macro.
Thanks everyone !
Love,
Kaitlyn
You should be able to record a macro that does this using the AUTOFILTER.
1) Turn on the macro recorder
2) Click the header row for your data table
3) Turn on the DATA > FILTER
4) Apply a filter to column B for Less than 500
5) Highlight all visible rows and delete them
6) Turn off the AutoFilter
7) Turn off the macro recorder
Now you have the base code and it should only need minor tweaks. What row is your headers? Is there any other data below the actual data in column B?
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
?None of us is as good as all of us? - Ray Kroc
?Actually, I *am* a rocket scientist.? - JB (little ones count!)
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks