+ Reply to Thread
Results 1 to 14 of 14

Counting the emails that match another column while so matching a condition in another

  1. #1
    Registered User
    Join Date
    10-09-2022
    Location
    Washington, USA
    MS-Off Ver
    Google Sheets
    Posts
    7

    Counting the emails that match another column while so matching a condition in another

    I am trying to count the number of time an email appears on sheet 2 that also appears on sheet 1 that is from source computer on dates 5/6/20 and 5/7/20. I need to be able to change the date as needed to count this email match. The sheets update daily with new data so ideally the less manipulating of columns the better. Hoping for a single formula to complete this action. In my example the count should equal 2.

    Example Question.xlsx

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,767

    Re: Counting the emails that match another column while so matching a condition in another

    I am trying to count the number of time an email appears on sheet 2 that also appears on sheet 1 that is from source computer on dates 5/6/20 and 5/7/20.
    Sheet 1 has source - sheet2 does not have anysource
    So does that mean if on sheet1 it does not have 'computer' , then do not count at all


    =IF(B2<>"computer", "", COUNTIFS(Sheet2!$A$2:$A$30,Sheet1!A2,Sheet2!$B$2:$B$30,">="&$F$2,Sheet2!$B$2:$B$30,"<="&$G$2))

    you can change the dates in F2 and G2 - also change the range to suit any future additions

    personally I dont like to refer to whole columns like Sheet2!$B:$B prefer a range
    Attached Files Attached Files
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Registered User
    Join Date
    10-09-2022
    Location
    Washington, USA
    MS-Off Ver
    Google Sheets
    Posts
    7

    Re: Counting the emails that match another column while so matching a condition in another

    Yes the source is only on sheet 1 but I need a total count of emails on sheet 2 that appear on sheet 1 from source "computer". Ideally one cell with the total count. The date selector will work though, thank you!

  4. #4
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,767

    Re: Counting the emails that match another column while so matching a condition in another

    so did that work OK

  5. #5
    Registered User
    Join Date
    10-09-2022
    Location
    Washington, USA
    MS-Off Ver
    Google Sheets
    Posts
    7

    Re: Counting the emails that match another column while so matching a condition in another

    It counted the emails in a new column however, I need the count to appear in a single cell. Can I use the if statement instead of countifs?

    EDIT
    Also I should add that the emails won't always line up so matching the email row for row isn't an option.
    Last edited by habitwestern790; 10-09-2022 at 04:23 PM.

  6. #6
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,767

    Re: Counting the emails that match another column while so matching a condition in another

    i think may work - not tested fully

    =SUMPRODUCT((B2:B7="computer")*(A2:A7=Sheet2!A2:A7)*(Sheet2!B2:B7>=Sheet1!F2)*(Sheet2!B2:B7<=Sheet1!G2))


    May also be able to do with FILTER()
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    10-09-2022
    Location
    Washington, USA
    MS-Off Ver
    Google Sheets
    Posts
    7

    Re: Counting the emails that match another column while so matching a condition in another

    I get an Error: Array arguments to MULTIPLY are of different size.

    I will look into filter and see if I am able to apply it.

  8. #8
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,767

    Re: Counting the emails that match another column while so matching a condition in another

    are the ranges all the same
    what version of excel do you have
    its an array formula -
    Windows version Ctrl+Shift+Enter

    365 deals with arrays automatically

  9. #9
    Registered User
    Join Date
    10-09-2022
    Location
    Washington, USA
    MS-Off Ver
    Google Sheets
    Posts
    7

    Re: Counting the emails that match another column while so matching a condition in another

    I am doing this in google sheets. Yes the ranges are the same, I am selecting the entire columns (minus the title row) because the sheets update with new data daily and I want it to be calculated as the new rows are added. I am putting this calculated on a third sheet as well, not sure if that matters.

  10. #10
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,767

    Re: Counting the emails that match another column while so matching a condition in another

    sorry, i see you have posted in "other forum" - I dont know google sheets enough to be able to tell if it will work - Sorry

  11. #11
    Registered User
    Join Date
    10-09-2022
    Location
    Washington, USA
    MS-Off Ver
    Google Sheets
    Posts
    7

    Re: Counting the emails that match another column while so matching a condition in another

    Thats okay, I am going to use your first formula and just do a countif of the 1's to get my number. You have been very helpful!

  12. #12
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,767

    Re: Counting the emails that match another column while so matching a condition in another

    why not just a SUM() ??
    unless emails in the list may not be unique - ???
    would the same email still count as 1

  13. #13
    Registered User
    Join Date
    10-09-2022
    Location
    Washington, USA
    MS-Off Ver
    Google Sheets
    Posts
    7

    Re: Counting the emails that match another column while so matching a condition in another

    One email shows that it appeared twice but I only want each email counted once so I am doing =countif(range, "1")+countif(range, "2").

  14. #14
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,767

    Re: Counting the emails that match another column while so matching a condition in another

    in excel - "1" will look for numbers entered as text, so
    =countif(range, 1)+countif(range, 2)
    will be seen as a number
    at least in excel

    OR will changing to this help
    =IF(B2<>"computer", "", IF(COUNTIFS(Sheet2!$A$2:$A$30,Sheet1!A2,Sheet2!$B$2:$B$30,">="&$F$2,Sheet2!$B$2:$B$30,"<="&$G$2)>0,1,""))

    you have it covered anyway, so i should leave you to it really
    Attached Files Attached Files

+ 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. Need help on multiple column matching with condition added on rows
    By LOANT in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-07-2018, 10:50 PM
  2. [SOLVED] VBA to insert column based on condition for matching col data
    By tikistat in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 11-13-2017, 11:21 AM
  3. counting of specific symbols in column with some condition (value of cell above)
    By erkamu in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-03-2015, 01:45 AM
  4. Counting unique values based on condition in a different column
    By rafuk73 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-21-2014, 02:59 PM
  5. [SOLVED] Dynamic counting of matching text cells in column
    By Scoopdoug in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-03-2014, 10:23 PM
  6. Replies: 5
    Last Post: 08-24-2012, 10:59 AM
  7. Counting unique names with three column condition
    By moyounis in forum Excel General
    Replies: 9
    Last Post: 07-11-2011, 08:36 AM

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