+ Reply to Thread
Results 1 to 4 of 4

If Statement that checks two cells

  1. #1
    Registered User
    Join Date
    01-31-2014
    Location
    East Coast, England
    MS-Off Ver
    Excel 2010
    Posts
    44

    If Statement that checks two cells

    Hi Ladies and Gents,

    I am trying to check a cell to see if it contains "Deactivation" and if it does check to see if the cell next to it contains "Prepaid" if both are true delete the entire row if either one is not true move on to the next.

    Attached is a sample of my data (some columns blanked out for security reasons.) The code i have currently just deletes anything that is a deactivation.

    Please Login or Register  to view this content.
    Any help greatly received.

    Thank you in advance

    Rich
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor Kamboj's Avatar
    Join Date
    09-25-2014
    Location
    India
    MS-Off Ver
    2003 - 2010
    Posts
    430

    Re: If Statement that checks two cells

    change one line of your code
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    01-31-2014
    Location
    East Coast, England
    MS-Off Ver
    Excel 2010
    Posts
    44

    Re: If Statement that checks two cells

    Thanks Kamboj works a treat.

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: If Statement that checks two cells

    Try:

    Please Login or Register  to view this content.
    Note: When Looping to delete rows you should delete from bottom to top.
    Last edited by JOHN H. DAVIS; 06-22-2015 at 09:05 AM.

+ 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. Replies: 0
    Last Post: 11-21-2014, 05:00 PM
  2. [SOLVED] Formula which checks whether a string is found in a range and checks 2 criteria
    By liranbo in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-30-2012, 05:28 PM
  3. COUNTIF statement with 3 criteria checks
    By Malvaro in forum Excel General
    Replies: 4
    Last Post: 06-04-2006, 06:45 PM
  4. [SOLVED] if-then statement that checks for existence of series 2
    By danz98 in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 08-24-2005, 05:05 PM
  5. If-then statement that checks for existence of series 2
    By danz98 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-16-2005, 02:05 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