+ Reply to Thread
Results 1 to 7 of 7

How - Match/If/Countif

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    05-09-2010
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    212

    How - Match/If/Countif

    Hi,

    Please refer to file attached.

    Clause one formula - =IF(AND(COUNTIF($A$5:$A$6,A16)=1,INDEX($B$5:$B$6,MATCH(A16,$A$5:$A$6,0))<>B16),"Check ","True")
    Clause two formula - = IF(AND(COUNTIF($A$5:$A$6,A17)<>1,VALUE(MID(B17,4,2))=MONTH($B$1),(VALUE(RIGHT(B17,4))=YEAR($B$1))),"TRUE","Check-Date")

    No idea how to combine it together. Please help.


    Thanks
    Attached Files Attached Files
    Last edited by Shermaine2010; 03-31-2013 at 09:31 PM.

  2. #2
    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
    53,049

    Re: How - Match/If/Countif

    I didnt have time to check your file, but could you not just replace the TRUE in the 1st formula with the entire 2nd formula?

    =IF(AND(COUNTIF($A$5:$A$6,A16)=1,INDEX($B$5:$B$6,MATCH(A16,$A$5:$A$6,0))<>B16),"Check ","= IF(AND(COUNTIF($A$5:$A$6,A17)<>1,VALUE(MID(B17,4,2))=MONTH($B$1),(VALUE(RIGHT(B17,4))=YEAR($B$1))),"TRUE","Check-Date")")
    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

  3. #3
    Forum Contributor
    Join Date
    05-09-2010
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    212

    Re: How - Match/If/Countif

    tigertiger - your formula is applicable but I would like to show "Check" or "Check- Date".
    Last edited by Shermaine2010; 03-31-2013 at 11:14 AM.

  4. #4
    Valued Forum Contributor
    Join Date
    11-11-2008
    Location
    Euro
    MS-Off Ver
    2007, 2010
    Posts
    470

    Re: How - Match/If/Countif

    Quote Originally Posted by Shermaine2010 View Post
    tigertiger - your formula is applicable but I would like to show "Check" or "Check- Date".
    if that, you use the formula for C15
    =IF(COUNTIF($A$5:$A$6,A15)>0,IF(B15=LOOKUP(A15,$A$5:$A$6,$B$5:$B$6),TRUE,"Check"),IF(B15=$B$1,TRUE,"Check-Date"))
    copy down for C16,C17,...etc

    one time again:
    However, plz, you 'd mention about all cell containing date data --- All cells that , except cell B1, contain date as text (not date type) - cause the failure result
    Last edited by tigertiger; 03-31-2013 at 07:22 PM. Reason: more exact formula
    Best regard, -)iger-/iger
    If you are pleased with a solution mark your post SOLVED.

  5. #5
    Forum Contributor
    Join Date
    05-09-2010
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    212

    Re: How - Match/If/Countif

    Quote Originally Posted by tigertiger View Post
    if that, you use the formula for C15
    =IF(COUNTIF($A$5:$A$6,A15)>0,IF(B15=LOOKUP(A15,$A$5:$A$6,$B$5:$B$6),TRUE,"Check"),IF(B15=$B$1,TRUE,"Check-Date"))
    copy down for C16,C17,...etc

    one time again:
    However, plz, you 'd mention about all cell containing date data --- All cells that , except cell B1, contain date as text (not date type) - cause the failure result


    Thanks. Also thanks for the reminder. I am aware that B1 is date format. I use formula to change it. Thanks

  6. #6
    Forum Contributor
    Join Date
    05-09-2010
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    212

    Re: How - Match/If/Countif

    Quote Originally Posted by FDibbins View Post
    I didnt have time to check your file, but could you not just replace the TRUE in the 1st formula with the entire 2nd formula?

    =IF(AND(COUNTIF($A$5:$A$6,A16)=1,INDEX($B$5:$B$6,MATCH(A16,$A$5:$A$6,0))<>B16),"Check ","= IF(AND(COUNTIF($A$5:$A$6,A17)<>1,VALUE(MID(B17,4,2))=MONTH($B$1),(VALUE(RIGHT(B17,4))=YEAR($B$1))),"TRUE","Check-Date")")
    There is error on formula clause one...
    If no MATCH, formula become #N/A .. Formula clause two unable to apply...

  7. #7
    Valued Forum Contributor
    Join Date
    11-11-2008
    Location
    Euro
    MS-Off Ver
    2007, 2010
    Posts
    470

    Re: How - Match/If/Countif

    use this formula for cell C15:

    =IF(COUNTIF($A$5:$A$6,A15)>0,B15=LOOKUP(A15,$A$5:$A$6,$B$5:$B$6),B15=$B$1)


    However, plz, you 'd mention about all cell containing date data --- All cells that , except cell B1, contain date as text (not date type) - cause the failure result

+ 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