+ Reply to Thread
Results 1 to 9 of 9

Add addition to a list by year

  1. #1
    Registered User
    Join Date
    02-02-2016
    Location
    Arlington, VA
    MS-Off Ver
    Office 2013
    Posts
    5

    Add addition to a list by year

    I'm trying to count the number of new categories that I added to my inventory each year. I'm currenty using countif(Range, ">0") and then subtracting the results from previous years, but I'm having to offset this because sometimes I because I have zero of that item in a subsequent year (e.g., Category 2, 2014). Is there a way I can write a formula to count new categories added by year easily?

    For results, I'm expecting 2 for 2013 (since 2 new categories were added), 1 for 2014 (since only Category 3 is a new category), and 0 for 2015 (since no new categories were added).

    2013 2014 2015
    Category 1 1 4 0
    Category 2 2 0 6
    Category 3 0 5 1

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Add addition to a list by year

    There is nothing in the data you provided that shows when a category was added. If you include a date indicating when the category was added, then this task would be possible.

  3. #3
    Registered User
    Join Date
    02-02-2016
    Location
    Arlington, VA
    MS-Off Ver
    Office 2013
    Posts
    5

    Re: Add addition to a list by year

    Sorry, I thought it was clear from the description and the chart. Categories 1 and 2 were added in 2013. Category 3 was added in 2014. No categories were added in 2015.

  4. #4
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Add addition to a list by year

    It is not clear. How can I tell by looking at only the data provided when a Category was added? Excel does not read your verbal comments.

  5. #5
    Registered User
    Join Date
    02-02-2016
    Location
    Arlington, VA
    MS-Off Ver
    Office 2013
    Posts
    5

    Re: Add addition to a list by year

    I'm aware of that. I have three years in my header so I'm not sure what I'm supposed to add. The first time a Category appears as a non-zero number is the year it was added, and I've also provided the expected results.

  6. #6
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Add addition to a list by year

    Ah, that makes a lot more sense.

    The attached makes use of an array formula in a helper column, First Found. Normally you could use MATCH for this, but MATCH looks for specific values. So we have to "translate" >0 to TRUE. =MATCH(TRUE,B2:D2>0,0) Array formulas work on ranges instead of individual cells. So what this formula essentially doing is comparing Cell B2 > 0 and Cell C2 > 0. etc. and converting them inside the array formula to TRUE or FALSE. Then MATCH can look for the true or false.

    For more information about array formulas, see this article: http://www.utteraccess.com/wiki/inde...Array_Formulas

    Then the number new is a COUNTIF of the results of the array formulas.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    02-02-2016
    Location
    Arlington, VA
    MS-Off Ver
    Office 2013
    Posts
    5

    Re: Add addition to a list by year

    Awesome! Thanks. I'm trying to apply this to a much larger workbook I'm working on. This is just a mock-up. For some reason, this isn't translating onto my workbook. MATCH is just appearing as text instead of generating a number. I've created an XLSB file (I was working an XLSX) but can't seem to get the formula to generate a number instead of appearing as text. Do you know why this might be happening? Sorry, I'm a bit of a rookie at this.

  8. #8
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Add addition to a list by year

    Check the format of the cell in which the formula is entered. If it's text, then change it to number. You may have to press F2 as well. Also (donning my Captain Obvious hat) make sure your are starting out with = and that you enter it as an array formula CTRL-ALT-ENTER.

  9. #9
    Registered User
    Join Date
    02-02-2016
    Location
    Arlington, VA
    MS-Off Ver
    Office 2013
    Posts
    5

    Re: Add addition to a list by year

    The CTRL-ALT-ENTER made it work. Thank you!

+ 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. Need Help to add addition vba code that will udate my validation list
    By dj_mix in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-05-2015, 10:03 AM
  2. Addition of rows via. Drop Down List
    By Adam329 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-25-2013, 04:42 AM
  3. [SOLVED] Look up a date base on the year, and add up costs for that year from list
    By spedigo228 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-27-2012, 08:25 AM
  4. Convert a multiple year list of 365 days/year into an equivalent of 360 days/year
    By lobotomy in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-24-2012, 05:39 PM
  5. Replies: 5
    Last Post: 05-29-2009, 04:06 AM
  6. [SOLVED] Dependant Dropdowns - Addition of third list
    By Puzzled Percy in forum Excel General
    Replies: 2
    Last Post: 06-20-2006, 12:30 AM
  7. Search list for new addition
    By Mac Landers in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-25-2005, 04:06 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