+ Reply to Thread
Results 1 to 5 of 5

UPDATE ISNUMBER and nested FINDs not working as expected

  1. #1
    Forum Contributor
    Join Date
    09-19-2010
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2007
    Posts
    140

    UPDATE ISNUMBER and nested FINDs not working as expected

    Hey all,

    My initial post was too confusing. I will try to simplify.

    I have this record:
    Please Login or Register  to view this content.
    Notice after the second ampersand, there's a name without the comma.

    Now look at this record:
    Please Login or Register  to view this content.
    Notice after the second ampersand, there's a name with a comma delimited last from first and middle initial.

    I have this formula:
    Please Login or Register  to view this content.
    This successfully addresses the situation where there's a comma and outputs this:
    Please Login or Register  to view this content.
    However, in instance where there's no comma delimiting last and first name after the second ampersand, it outputs:
    Please Login or Register  to view this content.
    This is wrong. It's supposed to output:
    Please Login or Register  to view this content.
    In other words, if there's a comma, then we take the last name after the second ampersand, otherwise we pull the last name from the very beginning of cell.

    Thanks for response.Attachment 89414
    Last edited by johnmerlino; 11-08-2010 at 10:06 AM.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,036

    Re: ISNUMBER and nested FINDs not working as expected

    And what is input text?

    Best would be to upload example excel workbook so you can get answer ASAP and we don't need to spend time retyping your data.
    Thx.
    Never use Merged Cells in Excel

  3. #3
    Forum Contributor
    Join Date
    09-19-2010
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2007
    Posts
    140

    Re: UPDATE ISNUMBER and nested FINDs not working as expected

    What I'm basically trying to figure out is how to determine if a comma exists after that second ampersand.

    If it exists, then run this:
    Please Login or Register  to view this content.
    If it doesn't, then run this:
    Please Login or Register  to view this content.
    I know there's a handy formula like this:
    =IF(AND(LEN(A1)-LEN(SUBSTITUTE(A1,"&",""))
    But in this specific situation I don't know best way to determine whether a comma exists after second ampersand.

  4. #4
    Forum Contributor
    Join Date
    09-19-2010
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2007
    Posts
    140

    Re: UPDATE ISNUMBER and nested FINDs not working as expected

    I figured it out:
    Please Login or Register  to view this content.

  5. #5
    Valued Forum Contributor squiggler47's Avatar
    Join Date
    02-17-2009
    Location
    Littleborough, UK
    MS-Off Ver
    Excel 3.0 to 2007+2010! (couldnt get 2.1 working)
    Posts
    1,013

    Re: UPDATE ISNUMBER and nested FINDs not working as expected

    Ok given the data so far :-


    KNUD J & MARIA L HOSTRUP
    HOSTRUP, KNUD J & MARIA L
    Sarah Ann Little Junior
    Jenners,Ann Sally
    HernaraMartin,Harry & Marie Anne & Ann Sally


    Would need 3 formulas to split them up :-
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.


    Basically what we have is several cases where "," or "&" are present or not, combining these :-

    =CHOOSE((LEN(B2)-LEN(SUBSTITUTE(B2,"&","")))*3+LEN(B2)-LEN(SUBSTITUTE(B2,",",""))+1

    gives us choices based on the number which is unique for each of the above cases this then selects the correct formula for each case in each column.

    you will notice that some choices in the formula have letters "C","F","G","I" these are so far unknown cases if you get the letter showing up just create a formula to get the correct result and paste it in the formula over the letter in quotes!

    Please find attached the file I used to create the formulas, the part formulas are highlighted in yellow, along with the final formula!
    Attached Files Attached Files
    Regards
    Darren

    Update 12-Nov-2010 Still job hunting!

    If you are happy with the results, please add to our reputation by clicking the blue scales icon in the blue bar of the post.

    Learn something new each day, Embrace change do not fear it, evolve and do not become extinct!


+ 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