+ Reply to Thread
Results 1 to 4 of 4

Data matching formula

  1. #1
    Forum Contributor
    Join Date
    11-24-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    225

    Data matching formula

    Hi all

    I want to check whether Cell 2 company or Cell D2 company code purchase both Public and Priv. in the full database. Say for example, if Global Business Solutions Ltd purchase both public and priv. any time in the full data set, it may indicate as "both purchasing" and otherwise nothing.

    How to write this formula which count only if a company have purchased both public and priv. in the dataset. Please see the attached excel sheet.

    Thanks
    Shams
    Attached Files Attached Files

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Data matching formula

    In F2

    =IF(AND(COUNTIFS($D$2:$D$1312,D2,$E$2:$E$1312,"Priv."),COUNTIFS($D$2:$D$1312,D2,$E$2:$E$1312,"Public")),"Both purchasing","")

    Copy down
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Data matching formula

    Do you mean?

    =and(COUNTIFS($C$2:$C$1041,C2,$E$2:$E$1041,"Priv.")>0,COUNTIFS($C$2:$C$1041,C2,$E$2:$E$1041,"Public")>0)
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  4. #4
    Forum Contributor
    Join Date
    11-24-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    225

    Thumbs up Re: Data matching formula

    Dear all

    Thank you very much for quick solution. It works very well.

    Great!!!

    Regards
    Shams


    Quote Originally Posted by Ace_XL View Post
    In F2

    =IF(AND(COUNTIFS($D$2:$D$1312,D2,$E$2:$E$1312,"Priv."),COUNTIFS($D$2:$D$1312,D2,$E$2:$E$1312,"Public")),"Both purchasing","")

    Copy down

+ 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