+ Reply to Thread
Results 1 to 5 of 5

Excel 2008 : If textstring exists in column A and also column C, replace cell in Column A with ""

  1. #1
    Registered User
    Join Date
    03-10-2012
    Location
    New York, NY
    MS-Off Ver
    Excel 2008
    Posts
    3

    If textstring exists in column A and also column C, replace cell in Column A with ""

    I'm trying to compare email addresses in column A with those listed in Column C.
    If any of those listed in column A don't exist in C, I'd like to delete them.
    Is there an IFEXIST, True, False formula I could use to compare textstrings listed in on column that is a named range, with another?
    Thanks for your suggestions...
    --Bob

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    re: If textstring exists in column A and also column C, replace cell in Column A with ""

    Hello,

    you can't use a formula to delete cell contents. That would require a macro, but seeing that you are using XL 2008 for Mac, macros are not an option. You could create a formula in a separate column, say column D, then sort all values by the results in column D and delete the data in column A for these cells. A possible formula might be:

    =if(isna(match(A2,C:C,0)),"delete","keep")

    This is assuming that the first row has data labels and the formula starts in row 2. Copy down.

    cheers,

  3. #3
    Registered User
    Join Date
    03-10-2012
    Location
    New York, NY
    MS-Off Ver
    Excel 2008
    Posts
    3

    re: If textstring exists in column A and also column C, replace cell in Column A with ""

    Thank you very much for that Teylyn.
    I tried the formula but all results came back "Delete".
    I then substituted C:C for a named range such as "test1", thinking that it was comparing only one cell to the adjacent counterpart, but that change had no effect.
    I then realized that the text in the C column had formatted domains in upper case, so I copied that column into Word, changed to all lower case, pasted back, and voila!
    You are the Bomb! And...I learned more about Excel. Thank you so much for your kind help!
    --Bob

  4. #4
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: If textstring exists in column A and also column C, replace cell in Column A with ""

    FYI, match is not case sensitive, so I suspect you had other characters making it fail that you transfer to and from Word removed.
    Good luck.

  5. #5
    Registered User
    Join Date
    03-10-2012
    Location
    New York, NY
    MS-Off Ver
    Excel 2008
    Posts
    3

    Re: If textstring exists in column A and also column C, replace cell in Column A with ""

    Interesting Rory.
    There is nothing apparent, so perhaps that is one good technique to use when all else fails?
    --Bob

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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