+ 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
    54

    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
    Forum Expert
    Join Date
    04-01-2013
    Location
    East Auckland
    MS-Off Ver
    Excel 365
    Posts
    1,343

    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
    Forum Expert
    Join Date
    04-01-2013
    Location
    East Auckland
    MS-Off Ver
    Excel 365
    Posts
    1,343

    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
    2016
    Posts
    5,908

    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
    54

    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
    Forum Expert
    Join Date
    04-01-2013
    Location
    East Auckland
    MS-Off Ver
    Excel 365
    Posts
    1,343

    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)

Similar Threads

  1. [SOLVED] IF condition too complex
    By Aland2929 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-09-2012, 01:59 PM
  2. IF condition too complex
    By Aland2929 in forum Excel General
    Replies: 2
    Last Post: 11-20-2011, 01:06 PM
  3. IF condition too complex
    By Aland2929 in forum Excel General
    Replies: 10
    Last Post: 09-19-2011, 01:00 AM
  4. complex IF condition
    By dannyhadar123 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-03-2009, 05:18 AM
  5. SUM with complex condition
    By MatejaBg in forum Excel General
    Replies: 2
    Last Post: 10-21-2009, 08:00 AM
  6. Complex If Condition
    By jiguvaidya in forum Excel General
    Replies: 1
    Last Post: 02-26-2009, 12:28 AM
  7. Complex If Condition
    By k21k in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-20-2008, 02:30 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