+ Reply to Thread
Results 1 to 6 of 6

Count only Odd numbers between 1-15 from table of data

  1. #1
    Registered User
    Join Date
    02-25-2020
    Location
    Aus
    MS-Off Ver
    O365
    Posts
    3

    Unhappy Count only Odd numbers between 1-15 from table of data

    Hello!

    I'm relatively to Excel and working on a lotto number generator for some fun, while also learning some more about Excel and formulas etc.

    I've been able to put most of it together from searching and try and testing, but this one aspect, which seems like it should be easy, has been eluding me for days!

    All I need to do quite simply is find the correct formula to calculate all odd numbers that appear in the table of lotto numbers for each week from 1-15, 16-30 and 31-45. This formula will show the summary for the entire table.

    so there will be 3 separate formulas obviously, one for each section. I've tried combining the Sumproduct and MOD formula (counting odd numbers) with my countifs (between ranges 1-15 inclusive) but either receive an error or incorrect values.

    Not sure if perhaps I need to use a VBA function for this particular task?

    appreciate any advice or tips!

    Thanks
    Craig
    Last edited by Nascent23; 02-25-2020 at 07:19 AM.

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,496

    Re: Count only Odd numbers between 1-15 from table of data

    maybe try this... =SUM(COUNTIF(Wednesday_Lotto_Results[['#1]:[S2]],{1,3,5,7,9,11,13,15}))
    appears to work though I'm not going to sit down and count each, I'm sure you understand.

    EDIT: oh, and mine, just adjust the range for each set, this for 16-30
    =SUM(COUNTIF(Wednesday_Lotto_Results[['#1]:[S2]],{17,19,21,23,25,27,29}))
    and for 31-45
    =SUM(COUNTIF(Wednesday_Lotto_Results[['#1]:[S2]],{31,33,35,37,39,41,43,45}))
    Last edited by Sam Capricci; 02-25-2020 at 06:43 AM.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Count only Odd numbers between 1-15 from table of data

    another option might be:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    02-25-2020
    Location
    Aus
    MS-Off Ver
    O365
    Posts
    3

    Re: Count only Odd numbers between 1-15 from table of data

    That's great - I knew it would be simple! I was playing around with using the actual number ranges {1,3} etc. but not doing it correctly, appreciate your help!

  5. #5
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,496

    Re: Count only Odd numbers between 1-15 from table of data

    I'm not sure I'm giving you a count, I believe mine is giving you a sum of them because my totals do not match what xlent's total.
    I finally applied a filter to the columns and did hand counts and my total was closer to xlent's than it was to mine. My sum though was on.
    You might want to check.
    And thank you for the rep though I'm not sure it was deserved.

  6. #6
    Registered User
    Join Date
    02-25-2020
    Location
    Aus
    MS-Off Ver
    O365
    Posts
    3

    Re: Count only Odd numbers between 1-15 from table of data

    No it looks all fine to me - just a note, is that rest of the formulas are only counting numbers 1-7 in case of the Oz Lotto one, and not the Supp numbers. And as the sets (1-15) etc. have a different amount of numbers, i.e. 8 odds, 7 evens I've just applied an addition to it to multiply formula by 86.666% or 113.3333% respectively to even out the variance in the sets due to one side having more numbers. But seems to work well! Thank you again!

+ 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. Count unique numbers in a table array
    By DMA in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-25-2020, 04:06 PM
  2. Count NonZero numbers in a Pivot Table
    By aju051000 in forum Excel General
    Replies: 2
    Last Post: 06-28-2018, 08:51 PM
  3. Replies: 14
    Last Post: 09-29-2014, 02:58 PM
  4. Replies: 6
    Last Post: 12-22-2012, 05:04 PM
  5. Replies: 1
    Last Post: 02-09-2010, 06:16 PM
  6. how to develop a table to count in base numbers
    By waynebosz in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-25-2005, 11:06 AM

Tags for this Thread

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