+ Reply to Thread
Results 1 to 16 of 16

count if the number is greater than 0

  1. #1
    Registered User
    Join Date
    10-24-2018
    Location
    sunderland
    MS-Off Ver
    Version 2201 Build 16.0.14827.20186 64-bit
    Posts
    58

    count if the number is greater than 0

    hi all could you help please

    I am using the following formula to count various things , like the weather, if a truck is on contract,

    =SUMPRODUCT(('SUPERVISORS INPUT 2021'!O46:$O$2000='SUPERVISORS INPUT 2021'!O46)*('SUPERVISORS INPUT 2021'!X46:$AD$2000="WEATHER"))

    how would I get the formula above to count anything greater than 0

    hope that makes sense
    Last edited by sharky1978; 10-27-2020 at 04:29 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,948

    Re: count if the number is greater than 0

    Maybe:

    =SUMPRODUCT(('SUPERVISORS INPUT 2021'!O46:$O$2000='SUPERVISORS INPUT 2021'!O46)*('SUPERVISORS INPUT 2021'!X46:$AD$2000="WEATHER")*(Range>0))
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    10-24-2018
    Location
    sunderland
    MS-Off Ver
    Version 2201 Build 16.0.14827.20186 64-bit
    Posts
    58

    Re: count if the number is greater than 0

    thanks ali

    can I replace weather with range as i only want to count anything >0 in a cell
    Last edited by sharky1978; 10-23-2020 at 08:52 AM.

  4. #4
    Registered User
    Join Date
    10-24-2018
    Location
    sunderland
    MS-Off Ver
    Version 2201 Build 16.0.14827.20186 64-bit
    Posts
    58

    Re: count if the number is greater than 0

    I just get a name ref error when I do the above

    =SUMPRODUCT(('SUPERVISORS INPUT 2021'!O46:$O$2000='SUPERVISORS INPUT 2021'!O46)*('SUPERVISORS INPUT 2021'!X46:$AD$2000="WEATHER"))

    I was going to post a spread sheet but its just messy,

    to explain what my formula is doing its searching down my Colum for the vehicle registration and is counting various issue with the wagon which has stopped it from carrying out its work, the only thing I'm unable to do is use the above formula to count how many times my vehicle worked,

    so anything above 0 next to the registration will give me a count of 1, so if i had 5 on Monday and 0.2 on Tuesday my machine returns a count of worked days = 2 and the machine lost a day due to weather i would have

    worked days = 2
    down days for weather = 1

    hope that makes what I'm after a little clearer


  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,948

    Re: count if the number is greater than 0

    Attach a sample workbook. There are instructions at the top of the page.

  6. #6
    Registered User
    Join Date
    10-24-2018
    Location
    sunderland
    MS-Off Ver
    Version 2201 Build 16.0.14827.20186 64-bit
    Posts
    58

    Re: count if the number is greater than 0

    hi sorry it took so long to get back

    i have attached a sample work book for you to have a look at (I HOPE)
    Attached Files Attached Files

  7. #7
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,783

    Re: count if the number is greater than 0

    Why for V15 VPL 7 not 8 ?

  8. #8
    Registered User
    Join Date
    10-24-2018
    Location
    sunderland
    MS-Off Ver
    Version 2201 Build 16.0.14827.20186 64-bit
    Posts
    58

    Re: count if the number is greater than 0

    there number plates, some of the plates weren't available

  9. #9
    Registered User
    Join Date
    10-24-2018
    Location
    sunderland
    MS-Off Ver
    Version 2201 Build 16.0.14827.20186 64-bit
    Posts
    58

    Re: count if the number is greater than 0

    sorry i misunderstood

    v15 wouldn't be 7 or 8 as this would be how much material the machine laid during the day, so it would have worked Monday, Tuesday Wednesday and done nothing for the rest of the week so i would like to capture the 3 days it worked laying materials

    this would be over 52 weeks of the year

    thanks
    Last edited by sharky1978; 10-27-2020 at 03:04 AM.

  10. #10
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: count if the number is greater than 0

    You have provided no manually calculated expected answers... so this is a guess.

    =SUMPRODUCT(--(Sheet1!$L$2:$L$31=A2),Sheet1!$U$2:$U$31)

    copied down.
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  11. #11
    Registered User
    Join Date
    10-24-2018
    Location
    sunderland
    MS-Off Ver
    Version 2201 Build 16.0.14827.20186 64-bit
    Posts
    58

    Re: count if the number is greater than 0

    sorry i will update and repost

  12. #12
    Registered User
    Join Date
    10-24-2018
    Location
    sunderland
    MS-Off Ver
    Version 2201 Build 16.0.14827.20186 64-bit
    Posts
    58

    Re: count if the number is greater than 0

    hope this helps just added the count to sheet 2 from list 1
    Attached Files Attached Files

  13. #13
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,783

    Re: count if the number is greater than 0

    L2=SUMPRODUCT((Sheet1!$L$2:$L$31=[@VEHICLE])*(ISNUMBER(Sheet1!$U$2:$AA$31)))

    Copy down

  14. #14
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: count if the number is greater than 0

    Caracalla, that'll be it. I was confused by this:

    I WOULD LIKE DAYS USED ON CONTRACT TO COUNT ANY DAY THAT A FIGURE IS INPUTED ON SHEET 1 CELLS U2 : U31

  15. #15
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,783

    Re: count if the number is greater than 0

    We await the response of sharky 78

  16. #16
    Registered User
    Join Date
    10-24-2018
    Location
    sunderland
    MS-Off Ver
    Version 2201 Build 16.0.14827.20186 64-bit
    Posts
    58

    Red face Re: count if the number is greater than 0

    hi m8 works perfect

    (no idea how it does it but it does it)

    excel is whitch craft to me

    so my final formula ended up =SUMPRODUCT(('SUPERVISORS INPUT 2021'!$O$46:$O$2000=[@VEHICLE])*(ISNUMBER('SUPERVISORS INPUT 2021'!$X$46:$AD$2000)))

    thanks for the help

+ 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 number of cells since last value greater than a value
    By justibm in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-02-2018, 01:37 PM
  2. [SOLVED] Count Number of Cells in Col B that are greater than Col A
    By lordfa9 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-08-2015, 04:44 AM
  3. [SOLVED] Count number of cells in range since last number greater than zero
    By whitfieldcraig in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-18-2015, 06:38 AM
  4. Count number greater than zero
    By ScottBeatty in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-14-2014, 03:30 PM
  5. [SOLVED] How to count cells after last number greater than 0
    By gogreenpower in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 04-09-2014, 02:28 AM
  6. [SOLVED] How not to count text when looking for a number greater than
    By neeners36 in forum Excel General
    Replies: 5
    Last Post: 03-30-2012, 06:07 PM
  7. count a number that is less than a number and greater than a numbe
    By Dale in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-19-2005, 01:20 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