+ Reply to Thread
Results 1 to 10 of 10

unable to Countif values with conditions from second column

  1. #1
    Registered User
    Join Date
    04-18-2011
    Location
    calgary
    MS-Off Ver
    Excel 2003
    Posts
    6

    unable to Countif values with conditions from second column

    What I'm looking for a is a way to take two columns and add the values of that one column, minus the conditions of the other column.

    So the columns are setup that it has a short description, but I want to account for the days that matches the descirption but to exclude short desciprtions that have refresh in them.

    The days are 0,1-2, 3-6, 7-13, and >14

    So basically the values should add from column B for all that values that match in column A minus anything in Column A that has the word "refresh" in it.

    I'm good with Excel but I'm having a massive brain fart on this.

    Any help?
    Last edited by warwon; 04-18-2011 at 04:47 PM.

  2. #2
    Valued Forum Contributor scottylad2's Avatar
    Join Date
    09-03-2010
    Location
    edinburgh
    MS-Off Ver
    Office 2007 Prof & Office 2010 Student Edition
    Posts
    629

    Re: Simple excel formula - not getting it

    Your descriptions not making a great deal of sense, maybe down to the Brain condition lol Please upload a workbook with a sample of what you have and what you expect it to return, based on what condition
    Windows 7 using Office 2007 & 2010

    Remember your [ code ] [ /code ] tags, makes reading soooo much easier

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Simple excel formula - not getting it

    also,

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
    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.

    PLEASE PM WHEN YOU HAVE DONE THIS AND I WILL DELETE THIS POST
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Registered User
    Join Date
    04-18-2011
    Location
    calgary
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Simple excel formula - not getting it

    So I have uploaded my sample sheet I'm working on.

    So I only want the value of days total for 0,1,2,3 but the total should not include "dog"
    Attached Files Attached Files

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: unable to Countif values with conditions from second column

    Perhaps?

    =COUNTIF($B$2:$B$10,G18)-SUMPRODUCT(--($B$2:$B$10=G18),--($A$2:$A$10="Dog"))

    copied across

  6. #6
    Registered User
    Join Date
    04-18-2011
    Location
    calgary
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: unable to Countif values with conditions from second column

    That would work, but the value needs to be adjusted per day.

    So on my example sheet I have day 0, 1, 2, 3. They should account for the totals each day minus dog

  7. #7
    Registered User
    Join Date
    04-18-2011
    Location
    calgary
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: unable to Countif values with conditions from second column

    Sorry that example area is just to show the real totals. it has nothing to do with the final formula

  8. #8
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: unable to Countif values with conditions from second column

    Not following....

    If you put the formula in G19, it references only the rows with 0 in days column,

    When you copy across the to G20, G21, G22, then it consecutively looks at rows with Day column =1, =2, =3...

    The results are the same as what you had hard-coded as expected results.

  9. #9
    Registered User
    Join Date
    04-18-2011
    Location
    calgary
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: unable to Countif values with conditions from second column

    Trying to clear this up:

    I been looking at Countif, counta, and some mixure of the two. I can get the values some times, but them when I change the condition again it gets messed up.

    =countif(A2:A10, "<>dog") gives me a value of 5 which is great
    =countif(B2:B10,"=0") gives me a value of 3.

    But the the issues is I can't figure how to change that so that I can get the correct value if I was to combine them.

    Again the value "=0" will change so there be "=0", "=1", "=2", "=3"

    Basically all i want to do is get the sum from B2:B10 compared to A2:A10 minus Dog.


    Again, if B2:B10 was to look for the value of 0 add the sum compared to A2:A10 minus dog.

  10. #10
    Registered User
    Join Date
    04-18-2011
    Location
    calgary
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: unable to Countif values with conditions from second column

    I'm uploading a newer sheet to show that in the right area there is a series of columns where the data is going to get added base of the age of the day.
    Attached Files Attached Files

+ 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