+ Reply to Thread
Results 1 to 5 of 5

Hard to explain, please help

  1. #1
    Registered User
    Join Date
    04-02-2012
    Location
    Exeter
    MS-Off Ver
    Excel 2003
    Posts
    14

    Hard to explain, please help

    Hello

    I have a table of data showing the "flow" in one column and "hour ending" in another column. I have the formula =COUNTIF(A2:A8761,">=600") to show how many in the flow column are over capacity (i.e. over 600). What I then want to do is find out how many of this result (the number output was 974) have the "hour ending" of 1, then 2, then 3 etc up to 24. Preferably I'd like the whole thing to be done in one formula. I can't get my head around how to do this.

    This is a quick extract from the spreadsheet

    Flow Hr Ending
    206 1
    182 1
    162 1
    156 1

    I have sorted the data into ascending order by "Hr Ending". If anyone can help I will be very grateful.

    Thanks

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    12,305

    Re: Hard to explain, please help

    I think you mean
    =SUMPRODUCT((A2:A8761>=600)*(B2:B8761=1))
    Remember what the dormouse said
    Feed your head

  3. #3
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Hard to explain, please help

    Click GO ADVANCED and use the paperclip icon to post up a copy of your workbook. Make sure the workbook demonstrates your desired results if possible, or just highlight the cells you're trying to fix. Use BEFORE/AFTER sheets if that helps make it clearer.

  4. #4
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Hard to explain, please help

    Because you have sorted your data by column B here is an alternative to SUMPRODUCT()

    =COUNTIF(INDEX($A$2:$A$8761,MATCH(1,$B$2:$B$8761,0)):INDEX($A$2:$A$8761,MATCH(1,$B$2:$B$8761,0)+COUNTIF($B$2:$B$8761,1)-1),">=600")

    Change the 1's in the formula to cell ref holding the hour ending value so that by changing the value in that cell the formula will recalc for the new value
    Last edited by Cutter; 06-13-2012 at 01:32 PM.

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Hard to explain, please help

    Foofighter616,

    Please take a moment to read the forum rules and then amend your thread title to something descriptive of your problem. Once you have done this please send me a PM and I will remove this request.

    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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