+ Reply to Thread
Results 1 to 7 of 7

How to determine if multiple cells contain identical text but ignore the blanks?

  1. #1
    Registered User
    Join Date
    03-13-2013
    Location
    Houston, TX
    MS-Off Ver
    Excel 2010
    Posts
    20

    How to determine if multiple cells contain identical text but ignore the blanks?

    I have data which identifies the initials of a user across a period of 5 weeks. See attached.
    I need to identify if the same user was present for each row, but I have some weeks which are blank that I wan't ignored.
    If I use the A2=B2=C2=D2=E2 simple formula, then the blanks will return a FALSE, when really it should return a TRUE.

    I've searched through many more complex formulas but haven't found anything.
    I'm assuming there's a simple solution I just don't see.
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,725

    Re: How to determine if multiple cells contain identical text but ignore the blanks?

    Put this in G2:

    =IF(COUNTIF(A2:E2,A2)+COUNTIF(A2:E2,"")=5,"yes","no")

    then copy down.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    03-13-2013
    Location
    Houston, TX
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: How to determine if multiple cells contain identical text but ignore the blanks?

    Thanks, Pete.
    One question - the report now has columns inserted in between the weeks, with a date (not signifant data for my requested result). Now I notice the formula does not work. Any suggestions?
    Shall I attach a new example?

  4. #4
    Registered User
    Join Date
    03-13-2013
    Location
    Houston, TX
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: How to determine if multiple cells contain identical text but ignore the blanks?

    If anyone has any ideas, I'm attaching a revised sample data set for additional clarification.

    Many thanks!!
    Attached Files Attached Files

  5. #5
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,725

    Re: How to determine if multiple cells contain identical text but ignore the blanks?

    Use this instead in L2:

    =IF(SUMPRODUCT(((C2:I2=$A2)+(C2:I2=""))*(MOD(COLUMN(C2:I2),2)=1))>=4,"yes","no")

    Hope this helps.

    Pete

  6. #6
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: How to determine if multiple cells contain identical text but ignore the blanks?

    I think that want you need is something like this:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  7. #7
    Registered User
    Join Date
    03-13-2013
    Location
    Houston, TX
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: How to determine if multiple cells contain identical text but ignore the blanks?

    Thanks very much Pete and newdoverman!
    The mystery is solved!!

+ 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