+ Reply to Thread
Results 1 to 5 of 5

count and sum for the numbers

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    10-02-2012
    Location
    malaysia
    MS-Off Ver
    Excel 2016
    Posts
    140

    count and sum for the numbers

    Hi..

    I have data in excel file .

    i want to count the number and get the total for that particular numbers

    for an example
    count sum
    - 2 to 25 10 23000
    - 26 to 80
    - 81 to 120
    - 121 to 180
    '
    for 2 to 25 it must count number of records for "2 to 25" (">=2 to =<25")
    let say it have 10 records then put number 10 in column count
    then sum the 10 records and put into sum column

    The data can go up to 150,000 ..

    I have attached sample excel file ..

    Thanks
    Mathanraj
    Attached Files Attached Files

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: count and sum for the numbers

    You can enter this formula in B2 on Output for West sheet.

    =COUNTIFS(Data!A2:A1527,">=2",Data!A2:A1527,"<=25")
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  3. #3
    Forum Contributor
    Join Date
    10-02-2012
    Location
    malaysia
    MS-Off Ver
    Excel 2016
    Posts
    140

    Re: count and sum for the numbers

    thanks

    how to get sum
    is that i need to use like this
    =sumif(data!A2:A1527,">=2,Data!A2:A1527,"<=25")

    how write this into macro so that when i click the button it will show result ..

    Thanks
    Mathanraj

  4. #4
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: count and sum for the numbers

    For SUM you can use this:

    =SUMIFS(Data!$A$2:$A$1527,Data!$A$2:$A$1527,">=2",Data!$A$2:$A$1527,"<=25")

  5. #5
    Forum Contributor
    Join Date
    10-02-2012
    Location
    malaysia
    MS-Off Ver
    Excel 2016
    Posts
    140

    Re: count and sum for the numbers

    can this formula write into vba code

    I wan to know how to write these type of function into vba code in excel..

    Thanks
    Mathanraj

+ 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 alphanumeric codes only counting odd numbers not even numbers?
    By JACKBKNIMBLE in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-25-2013, 02:43 PM
  2. Replies: 6
    Last Post: 12-22-2012, 05:04 PM
  3. [SOLVED] Count numbers between two values in a coma delimited string of numbers
    By van23 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-10-2012, 11:42 PM
  4. How do i count numbers and letters to find a total count of all
    By Linda in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-10-2005, 12:55 PM
  5. [SOLVED] Count comma separated numbers, numbers in a range with dash, not t
    By Mahendra in forum Excel General
    Replies: 0
    Last Post: 08-08-2005, 01:05 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