+ Reply to Thread
Results 1 to 5 of 5

looking up and summing values

  1. #1
    Registered User
    Join Date
    07-09-2009
    Location
    Michigan, USA
    MS-Off Ver
    Excel 2003
    Posts
    11

    looking up and summing values

    I'm working with a worksheet with 4000+ rows, so I'm looking for a formula to automate a summation.

    In Worksheet1 (4000+ rows) I have data from 1998 to 2008 for each month and day:

    Year Mo Dy Data
    1998 1 1 41
    1998 1 2 35
    1998 1 3 79
    ...
    2008 12 29 39
    2008 12 30 81
    2008 12 31 42

    In Worksheet2 (365 rows) I have data for just months and days:

    Mo Dy Sum
    1 1 94
    1 2 103
    1 3 222
    ...
    12 29 65
    12 30 211
    12 31 98

    I'd like to take each Jan 1 datum for each year from Worksheet1, sum them, and place the value in the cell that corresponds to Jan 1 on Worksheet2. I've primarily tried using the VLOOKUP function, but can't seem to make it work.

    Any suggestions? Thank you in advance for the help!
    Last edited by ruberg; 07-09-2009 at 12:54 PM.

  2. #2
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,003

    Re: looking up and summing values

    Try this,
    C2
    Please Login or Register  to view this content.
    copied down.

    Hope this helps,
    windknife

  3. #3
    Registered User
    Join Date
    07-09-2009
    Location
    Michigan, USA
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: looking up and summing values

    Great, that definitely worked; thank you!

    Is there a simple way to take the average of all the data instead of the sum? In other words, is there another method besides the following:

    =(SUMPRODUCT(--(Sheet1!$B$2:$B$5000=A2),--(Sheet1!$C$2:$C$5000=B2),Sheet1!$D$2:$D$5000))/11

    And just for my own knowledge, what does "--" mean?

  4. #4
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,003

    Re: looking up and summing values

    Try this,

    Please Login or Register  to view this content.
    -- transfer True/False (Boolean) to 1/0 (Numeric)

    Hope this helps,
    windknife

  5. #5
    Registered User
    Join Date
    07-09-2009
    Location
    Michigan, USA
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: looking up and summing values

    Yes, that works wonderfully.

    Thanks again for your assistance!

+ 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