+ Reply to Thread
Results 1 to 6 of 6

Trying to add data from one column based upon categorization in another column

  1. #1
    Registered User
    Join Date
    10-02-2008
    Location
    Vermont
    Posts
    2

    Trying to add data from one column based upon categorization in another column

    I'm building a home finances tracker in Excel, and so far all is working for me, except this. Entries in Column C have been given a rating of 1-4 in Column E. On another worksheet, I would like to add all 1's, 2's and 3's to help track where money goes. I can't seem to get the formula right to take the $'s in C and add them, but only if they meet certain criteria (their Column E "value"). Please help!

  2. #2
    Valued Forum Contributor
    Join Date
    08-26-2008
    Location
    singapore
    Posts
    626
    A sumif or sumproduct function can help you.
    You can either try to settle the problem by using the 2 formulas or attach your file here
    I need your support to add reputations if my solution works.


  3. #3
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561
    =sumproduct(c1:c10,--(e1:e10<4))

    HTH

  4. #4
    Registered User
    Join Date
    10-02-2008
    Location
    Vermont
    Posts
    2
    Tried sumproduct and sumif, all I get is "0". I don't really want to upload this spreadsheet, as it's personal finances. I'm going to create an example and upload that to link from sglife. If I never am able to disseminate this data, I probably won't cry, but it sure would be nice if I could do this. Thank you for your help, Cheeky Charlie. I'll try to have that uploaded tonight, sglife.

  5. #5
    Registered User
    Join Date
    10-30-2008
    Location
    Texas
    Posts
    4
    If I understand, your sheet 1 Column C contains dollar values and Column E categories of 1 thru 4. Try the following formula on sheet 2 in whatever cell you wish the result to be in - =SUMIF(Sheet1!E2:E7,"1",Sheet1!C2:C7)

  6. #6
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561
    My first formula was rubbish actually, this makes much more sense:

    =SUMIF(E:E,"<4",C:C)

    Tested it and works fine for me.
    At a guess your problem is that your 1-4 in E are strings not numbers (if you are using a vlookup or something be sure not to put "numbers" in it:
    i.e. =if(true,1,0) not =if(true,"1","0")

    HTH

+ 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. Replies: 5
    Last Post: 07-09-2008, 10:12 AM
  2. VBA; find string and copy
    By Bill Rudd in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 03-06-2008, 10:41 PM
  3. Replies: 2
    Last Post: 02-27-2008, 10:25 PM
  4. Replies: 1
    Last Post: 01-17-2007, 11:50 PM
  5. Combine a Matching Column Headings' data in 2 Worksheets to 1
    By ravdog44 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-17-2006, 03:42 AM

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