+ Reply to Thread
Results 1 to 5 of 5

find 2 values if exist in the same time in line

  1. #1
    Registered User
    Join Date
    09-11-2014
    Location
    bucharest,romania
    MS-Off Ver
    ofiice 2007
    Posts
    11

    find 2 values if exist in the same time in line

    Hi,


    I have many lines:

    for example:




    1,45,49,32,7,8
    3,23,12,33,1,2

    ----------------

    How can I verify if two numbers( for example:5 and 7 in the same time) appear in line? And if appear I want to count this thing.
    Thanks

  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
    52,926

    Re: find 2 values if exist in the same time in line

    Hi, welcome to the forum

    If you know what numbers you need to test for, you can use something like this...
    for 1 number...
    =COUNTIF(A1:J1,5)
    For more than 1 number...
    =SUM(COUNTIF(A1:J1,{5,7}))
    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
    Registered User
    Join Date
    09-11-2014
    Location
    bucharest,romania
    MS-Off Ver
    ofiice 2007
    Posts
    11

    Re: find 2 values if exist in the same time in line

    For more than one number doesn't work!!!

    1 2 7 4 5 6 0 for 0 I put:=COUNTIF(A3:F3;{5,7})

    5 and 7 appear in the same time in line(third ,fifth )
    Where I wrong?

  4. #4
    Registered User
    Join Date
    09-11-2014
    Location
    bucharest,romania
    MS-Off Ver
    ofiice 2007
    Posts
    11

    Re: find 2 values if exist in the same time in line

    =AND(COUNTIF(A3:F3;5);COUNTIF(A3:F3;7))

    I find

  5. #5
    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
    52,926

    Re: find 2 values if exist in the same time in line

    Where I wrong?
    My post #2 gave 2 options, 1 for a single value and the 2nd fornula for 2 or more values

+ 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] Need to find if duplicate values exist in a column, concatenate cells and then delete
    By Siemieniuk in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-22-2017, 07:22 PM
  2. [SOLVED] Find if duplicate values exist in a column, concatenate cells and then de
    By filky in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-15-2014, 10:14 PM
  3. To find if error exist in a set of travel time values
    By pksreela in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 02-05-2012, 03:15 AM
  4. Replies: 11
    Last Post: 11-03-2011, 09:18 PM
  5. Replies: 3
    Last Post: 03-11-2006, 02:50 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