+ Reply to Thread
Results 1 to 5 of 5

Deleting rows matching a rule

  1. #1
    Registered User
    Join Date
    07-24-2007
    Posts
    9

    Deleting rows matching a rule

    Hi everyone,

    I need to delete all rows which in the column G do not have a certain value.

    I've got as well a header row which I don't want to be deleted.

    Can anyone give me a hand?

    Thanks and regards,

  2. #2
    Registered User
    Join Date
    07-23-2007
    Location
    Liverpool UK
    Posts
    6

    Expand

    Can you explain a little more...What is the value you wish to keep.

    If a cell contains "my value" i want to keep it?
    Also the rows you want to remove will they all contain the same value or will they be different?

  3. #3
    Registered User
    Join Date
    07-24-2007
    Posts
    9
    Hi Adam,

    Thanks for your reply. I'll try to explain it a bit better.

    I have a spreadsheet with my data in rows, I mean each record is one row and the columns are the different fields (amount, currency, date...).

    One of the columns is currency, USD, EUR, GBP... What I want to do is to delete all the rows but the ones containing for example GBP.

    Have you got an idea about I am trying to do?

    Thanks and regards,

  4. #4
    Registered User
    Join Date
    07-23-2007
    Location
    Liverpool UK
    Posts
    6

    If i understand right...

    If i understand right, why not just autofilter?

    Lets say all your currencies are in column A....
    DATA > FILTER > AUTOFILTER

    You can now select EUR from the drop down and delete them all
    When you undo the filter, all the cells containing EUR would be gone?

    Is this what you mean?

  5. #5
    Registered User
    Join Date
    07-23-2007
    Location
    Liverpool UK
    Posts
    6

    How about this:

    You could try this macro although it is case sensitive:

    Please Login or Register  to view this content.
    A pop up box will ask you the value of the row you want to delete and the macro will delete the row based on a value you enter....?

    Or this is one i use that could be adpated:

    Please Login or Register  to view this content.
    This one deletes a row if column A contains the word 'None'...Adapt accordingly.
    Hope these help
    Last edited by ADAMC; 07-24-2007 at 08:35 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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