+ Reply to Thread
Results 1 to 2 of 2

Thinking maybe some sort of array formula?

  1. #1
    Registered User
    Join Date
    01-09-2012
    Location
    Wellington, New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    1

    Thinking maybe some sort of array formula?

    Hi, I have 2 colums of data on worksheet 1 and another 2 colums on worksheet 2. The first column in worksheet 1 contains single integers and the second colun contains times in format [h]:mm. What I want to do is produce a sum figure in sheet 2 of the amount of time found in column 2 where the first column is a specific integer. Fore example; where A1 & A2 (sheet 1) both contain the number 2 and B1 & B2 contain 4:52 & 2:00 I want the cell in sheet 2 to look up the range A1:A2 in sheet 1 where the product is 2 and return the sum of the adjacent times. For this example the cell in sheet 2 would calculate 6:52. I hope this is making sense. Please can you advise on the best way to go about this. Many thanks for any help you can provide in advance.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Thinking maybe some sort of array formula?

    SUMIF() will allow you to sum the values in one column by comparing a single "match" value in another adjacent column.

    =SUMIF(Sheet2!A:A, 2, Sheet2!B:B)



    Note: If the values you are adding are time values, you will need to format the cell as [h]:mm so that it can properly display times totaling more than 24 hours.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ 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