+ Reply to Thread
Results 1 to 10 of 10

Count Formula-Would this be a good example to use the count function?

  1. #1
    Forum Contributor
    Join Date
    07-06-2008
    Location
    NC
    Posts
    149

    Count Formula-Would this be a good example to use the count function?

    Would this be a good example to use the count function??? if so could you get me started??!!!!

    I have a list that have the same items in it and all I want to do is only show them once but to add up the values in each.

    Never used it and playing with the idea to replace a pivot table
    Attached Files Attached Files

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Try

    =SUMIF($B$9:$B$18,B22,$C$9:$C$18)
    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Forum Contributor
    Join Date
    07-06-2008
    Location
    NC
    Posts
    149

    Amazing

    Works great!!! I was never thought about sumif......I have just learning better ways to simplify my formulas - moving away from macros and VB that I am actually better at, but finding out Excel has its own formulas that seem to be also work!!!

    Thanks!

  4. #4
    Forum Contributor
    Join Date
    07-06-2008
    Location
    NC
    Posts
    149

    Forgot one things..

    QUESTION: How do I get B22:B26 to only show one instance of the items

  5. #5
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988

  6. #6
    Forum Contributor
    Join Date
    07-06-2008
    Location
    NC
    Posts
    149

    Works but...

    I got it to work nicely. I was wondering how would I get it to work if I add a different item or change the name of the Items. I tried it and it doesn't work that way???

  7. #7
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    You would need an array formula - Enter with ctrl + Shift + Enter

    =INDEX($A$1:$A$10,SMALL(IF(ROW($A$1:$A$10)=MATCH($A$1:$A$10,$A$1:$A$10,0),ROW($A$1:$A$10)),ROW()))
    or code

    VBA Noob

  8. #8
    Forum Contributor
    Join Date
    07-06-2008
    Location
    NC
    Posts
    149

    Hmm

    I think you lost me here....???

    DO I have to move the data..I assume this is an example of how to use the code. ???

  9. #9
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Change the range to your range of items. Then commit with Ctrl + shift + enter

    then drag down...this will give you a list of all unqiue items in the range. That is what you wanted

    VBA Noob

  10. #10
    Forum Contributor
    Join Date
    07-06-2008
    Location
    NC
    Posts
    149

    Yeah

    I got it...it makes it an array by doing that....I understand......Excel is awesome and so are you!!!

    HAVE A NICE WEEKEND!!!!

+ 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