+ Reply to Thread
Results 1 to 6 of 6

Counting absolute values in range

Hybrid View

  1. #1
    Registered User
    Join Date
    09-06-2012
    Location
    Nairobi, Kenya
    MS-Off Ver
    Excel 2007
    Posts
    21

    Counting absolute values in range

    Hi All,

    I am working on counting data within a range of values. I have both negative and positive values and want my formula to only pick absolute values. I have tried both of the formulas below but none seems to work.

    =COUNTIFS(B2:B38,"<="&ABS(Parameters!B1),B2:B38,">="&ABS(Parameters!B2))

    =COUNTIFS(B2:B38,"<="&Parameters!B1,Data!B2:B38,">="&Parameters!B2,B2:B38,">="&-Parameters!B1,B2:B38,"<="&-Parameters!B2)
    Book 1.xls
    Attached is a workbook where I am using the formulas, please help.

    Kindest Regards
    Mo

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

    Re: Counting absolute values in range

    Use..

    =SUM(COUNTIFS(B2:B38,"<="&Parameters!B1,Data!B2:B38,">="&Parameters!B2),COUNTIFS(B2:B38,">="&-Parameters!B1,B2:B38,"<="&-Parameters!B2))
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Counting absolute values in range

    why should the result be 36 and not 24 if you are counting absolute values? (there are several that would be outside the 100m-1000m range on an absolute basis) if it should be 24
    =SUMPRODUCT((ABS(B2:B38)<=Parameters!B1)*(ABS(B2:B38)>=Parameters!B2))
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  4. #4
    Registered User
    Join Date
    09-06-2012
    Location
    Nairobi, Kenya
    MS-Off Ver
    Excel 2007
    Posts
    21

    Re: Counting absolute values in range

    Thanks Ace and Joseph both your formulas worked. And Joseph your right the figure should be 24, my mistake.

  5. #5
    Registered User
    Join Date
    09-06-2012
    Location
    Nairobi, Kenya
    MS-Off Ver
    Excel 2007
    Posts
    21

    Re: Counting absolute values in range

    Thanks Dilipandey. I saw that after putting in the formulas.

  6. #6
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Counting absolute values in range

    Hi Muammar,

    According to me the result should be 24, see the yellow cells on the right side in the attached file:0
    Book 1.xls

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), dilipandey@gmail.com

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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