Closed Thread
Results 1 to 5 of 5

If function and text does not work

  1. #1
    Registered User
    Join Date
    05-14-2015
    Location
    Utrecht, NL
    MS-Off Ver
    Office 365ProPlus
    Posts
    3

    If function and text does not work

    Office 365 Pro Plus on Windows 7 professional 64 bit
    (see attachement)
    I have 4 columns
    Column A contains 2 cells with individual names: Mary, Pete,
    Column B contains a score: P2P, P3P
    column C contains a score: P2U,P3P,P4P,M2U,M3M

    I use the IF function toe separate the scores in column D & E.

    Column D: IF(B1="P2P";"P";"u") if column B contains the value P2P write P otherwise write U. The outcome however is U.
    Column E: IF(B1="P3P";"p";"u") if column B contains the value P3P write P otherwise write U.The outcome however again is U

    Same goes with the columns trying to separate on column C

    Values are separated by a comma, putting a space after the comma makes no difference. As there are several hundred scores a solution is sought for.

  2. #2
    Forum Contributor jayajaya_4's Avatar
    Join Date
    05-09-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    259

    Re: If function and text does not work

    hey dear ur description is not matching ur file...pls give a bit more clarifications u need??

  3. #3
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: If function and text does not work

    Quote Originally Posted by jayajaya_4 View Post
    hey dear ur description is not matching ur file...pls give a bit more clarifications u need??
    Not to mention it's a duplicate post.
    http://www.excelforum.com/excel-form...-not-work.html

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,968

    Re: If function and text does not work

    HI, welcome to the forum

    1st, I think you forgot to upload your file?

    2nd, if you have P2P, P3P in a single cell, then you need either use a different approach (see below) or use the entire contents in the IF. Your IF is looking to find ONLY P2P, but the cells does not contain only that.

    Here is 1 method that will give you what you want...
    =IF(ISERROR(SEARCH("P2P",A1,1)),"U","P")

    However, if the "2" keeps changing, you will need to change that manually. If you are ONLY looking for P-a number-P, then this will work better for you...
    =IF(ISERROR(SEARCH("P?P",A1,1)),"U","P")
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,968

    Re: If function and text does not work

    Thanks Jonmo

    Welcome to the Forum, unfortunately:

    This is a duplicate post and as such does not comply with Rule 5 of our forum rules. This thread will now be closed, you may continue in your other thread.

    Thread Closed.
    http://www.excelforum.com/excel-form...-not-work.html

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. If function and text does not work
    By GeorgeKerstholt in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-16-2015, 06:51 AM
  2. [SOLVED] Vlookup function doesn't work on identical text
    By moty.98 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 07-17-2013, 11:35 AM
  3. Extract text strings separated by commas and spaces
    By VB15 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 06-21-2012, 04:49 PM
  4. Replace function and Option Compare Text don't work
    By audax in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-12-2009, 03:31 AM
  5. text box function won't work
    By mufan in forum Excel General
    Replies: 2
    Last Post: 11-21-2008, 11:02 PM

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