+ Reply to Thread
Results 1 to 9 of 9

Looking to count up each time data is presented????

  1. #1
    Forum Contributor
    Join Date
    08-07-2012
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    202

    Looking to count up each time data is presented????

    Hello all.
    What I'm needing to do is, i have five columns of data. Beside each column is another column that counts up each time there is data in the cell to the left of it.
    I need, when a cell has data put into it, say B4, for C4 to find the last time B4's data was present and count up from that last point. If that makes sense.
    I have an example sheet present with this to give an idea of what I'm looking for with some examples on it. But, i need it to do for all possible data that is put into each cell.
    I know this can be done, but not sure if i can do it with a formula or if i need, VBA, macro or what. I can do the countif part that i need to go with it, but have no idea where to even begin this step. Meaning i can get it to count the total amount of times each piece of data is present, but need to count each separately on the sheet.

    I know you guys are the best with this stuff, and surely someone can lead me to where i need to be, or help me with this.

    I really appreciate you guys and all the help you've given, and continue to give!!!!
    Much thanks to all!!!
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Looking to count up each time data is presented????

    Hi,

    In the first row, you need

    =(COUNTIF($B$4:$B$13,B4)+COUNTIF($D$4:$D$13,B4)+COUNTIF($F$4:$F$13,B4)+COUNTIF($H$4:$H$13,B4)+COUNTIF($J$4:$J$13,B4))

    and then in the second row you need

    =(COUNTIF($B$4:$B$13,B5)+COUNTIF($D$4:$D$13,B5)+COUNTIF($F$4:$F$13,B5)+COUNTIF($H$4:$H$13,B5)+COUNTIF($J$4:$J$13,B5))-(COUNTIF(B4,B5)+COUNTIF(D4,B5)+COUNTIF(F4,B5)+COUNTIF(H4,B5)+COUNTIF(J4,B5))

    then the subsequent rows

    =(COUNTIF($B$4:$B$13,B6)+COUNTIF($D$4:$D$13,B6)+COUNTIF($F$4:$F$13,B6)+COUNTIF($H$4:$H$13,B6)+COUNTIF($J$4:$J$13,B6))-(COUNTIF($B$4:$B5,B6)+COUNTIF($D$4:$D5,B6)+COUNTIF($F$4:$F5,B6)+COUNTIF($H$4:$H5,B6)+COUNTIF($J$4:$J5,B6))

    What you are doing is counting the times the value appears in the whole range, and then subtracting the amount of times it appears above.

    I have attached the sheet you sent back for you to see.
    Attached Files Attached Files

  3. #3
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Looking to count up each time data is presented????

    in fact use


    =(COUNTIF($B$4:$B$13,B6)+COUNTIF($D$4:$D$13,B6)+COUNTIF($F$4:$F$13,B6)+COUNTIF($H$4:$H$13,B6)+COUNTIF($J$4:$J$13,B6))-(COUNTIF($B$4:$B4,B6)+COUNTIF($D$4:$D4,B6)+COUNTIF($F$4:$F4,B6)+COUNTIF($H$4:$H4,B6)+COUNTIF($J$4:$J4,B6))

    for lines 2 down

  4. #4
    Forum Contributor
    Join Date
    08-07-2012
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    202

    Re: Looking to count up each time data is presented????

    nathansav,

    That is just amazing!!!! You guys never cease to amaze me with what you all can do with this.
    I know this will work, i just gotta figure out where to put what now. LOL. Surely i can do that though.
    Thank you so much nathansav, for the time you put into this for me!!!! You just saved me about a years worth of typing.
    And I know a thank you isn't much, but your a little far away for a hug. LOL.
    I believe i can use this on another part of my work also.

    THANK YOU!!! THANK YOU!!! THANK YOU!!!

  5. #5
    Forum Contributor
    Join Date
    08-07-2012
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    202

    Re: Looking to count up each time data is presented????

    Hi all. Would anyone know how to make this work with one column instead of all 5? I got this working with all 5, but need to do a single column by it's self. I tried cutting the formula down to just one column, but didn't work correctly. Tried to cut it down to cut the formula down with like B and D, but still not working for one column.

    Thanks bunches and bunches before and after!!!!

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

    Re: Looking to count up each time data is presented????

    In C4

    =COUNTIF($B$4:$B$13,B4)-COUNTIF($B$3:B3,B4)

    Copied down
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  7. #7
    Forum Contributor
    Join Date
    08-07-2012
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    202

    Re: Looking to count up each time data is presented????

    Thank you for the reply Ace_XL!!! That worked on the sheet like i have on here, but when i put it in my larger sheet I have no idea what it does. It will count like 2 rows with 1 then 2, then jump up to 265 or something like that. It doesn't count correctly for some reason. What am i doing wrong? Or will that work on a large scale?

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

    Re: Looking to count up each time data is presented????

    A few checks..

    - Make sure the ranges are right. For instance, you could extend the first data range to include up to Row 100
    - Make sure the abolute and relative references (the $ signs in the formula) are correct
    - Make sure Row 3 does not have numeric data in it
    - Make sure you are inputting the below formula in Row 4, if it is row 16 (for instance) the formula would read differently. (Replace 4 with 16 and 3 with 15).

    Please Login or Register  to view this content.
    If this still does not work, upload a sample worksheet with desired results

  9. #9
    Forum Contributor
    Join Date
    08-07-2012
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    202

    Re: Looking to count up each time data is presented????

    YES, YES, YES!!! Thank you thank you thank you!!! Don't know what i was doing wrong, but that sure fixed it. Thank you a ton!!!! Maybe i can get this finished yet. Thank you!!!!

+ 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