+ Reply to Thread
Results 1 to 2 of 2

Delete row if value in Column(B) is under 500

  1. #1
    Registered User
    Join Date
    07-18-2013
    Location
    New York, USA
    MS-Off Ver
    Excel 2003
    Posts
    13

    Delete row if value in Column(B) is under 500

    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

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Delete row if value in Column(B) is under 500

    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!)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Macro to delete certain columns and delete rows based on time in another column
    By beepbeep27 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-12-2012, 11:47 AM
  2. [SOLVED] Delete Cell Numbers of Column B From Column A (Column B Small and Column A too big)
    By it_electronics2000 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-09-2012, 08:56 AM
  3. [SOLVED] Delete Cell Numbers of Column B From Column A (Column B Small and Column A too big)
    By it_electronics2000 in forum Excel General
    Replies: 5
    Last Post: 04-06-2012, 12:02 PM
  4. [SOLVED] Delete Cell Numbers of Column B From Column A (Column B Small and Column A too big)
    By it_electronics2000 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 04-06-2012, 11:18 AM
  5. Sort Column, Delete Rows, Delete Column, Move Molumn, more inside?
    By motown in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-13-2008, 09:44 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1