+ Reply to Thread
Results 1 to 6 of 6

Complex If condition

  1. #1
    Registered User
    Join Date
    06-04-2017
    Location
    India
    MS-Off Ver
    2013
    Posts
    50

    Complex If condition

    There are some period e.g. 1ABCD,2AC in column A .I want to map them to row such as 1A,1B,1C, etc in row 1

    Put 1 where mapping is found and 0 where mapping is not found

    Please find attached excel sheet with the expected output
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    04-01-2013
    Location
    East Auckland
    MS-Off Ver
    Excel 2010
    Posts
    991

    Re: Complex If condition

    try this in B2 (then you can fill right and down)

    Please Login or Register  to view this content.
    Last edited by scottiex; 06-14-2018 at 09:01 PM.
    If you want something done right... find a forum and ask an online expert.

    Time flies like an arrow. Fruit flies like a banana.

  3. #3
    Valued Forum Contributor
    Join Date
    04-01-2013
    Location
    East Auckland
    MS-Off Ver
    Excel 2010
    Posts
    991

    Re: Complex If condition

    Actually this will get scenarios like 7AB8CD wrong because it will think you want to include 7C and 7D.

    This might be too complex for a formula if there could be any combination of codes in there.
    Is there a reason why the initial format has to be as it is?

  4. #4
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2010
    Posts
    3,094

    Re: Complex If condition

    One way:

    =COUNTIF($A2,REPLACE(B$1,2,0,"*")&"*")

  5. #5
    Registered User
    Join Date
    06-04-2017
    Location
    India
    MS-Off Ver
    2013
    Posts
    50

    Re: Complex If condition

    @Phuocam- Your formula is not working right for 8B and 8D ..But I have modified your formula and created COUNTIF($A2,"*"&REPLACE(B$1,2,0,"*")&"*")...This is working perfectly

  6. #6
    Valued Forum Contributor
    Join Date
    04-01-2013
    Location
    East Auckland
    MS-Off Ver
    Excel 2010
    Posts
    991

    Re: Complex If condition

    test if for scenarios like "7AD8B"
    I think you will find it fails in the way I described above for mine.

+ 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