+ Reply to Thread
Results 1 to 6 of 6

summing based on a criteria but the criteria is not the format i want

Hybrid View

  1. #1
    Registered User
    Join Date
    07-17-2012
    Location
    Auckland
    MS-Off Ver
    Excel 2010
    Posts
    36

    summing based on a criteria but the criteria is not the format i want

    Hi there

    hopefully the question is in the title: summing based on a criteria but the criteria is not the format i want
    I have come up with a solution in Sheet1A but i don't want to add another column.
    Please ask any question if the question is not clear.

    See the attached.
    1. How do I get the sum of ValueA for the month of June and put it in column G2
    2. Assume that hourly data will be appended to this so in future I will want to get July values…etc
    3. I am looking to do the same for ValueB & ValueC
    4. I could add another column in column as I have done here and this works (Answer I want is in column J) see Sheet1A


    Row Labels	ValueA	ValueB	ValueC			Month I want
    8/06/2013 2:00	2	89	21			0
    8/06/2013 3:00	30	81	66			
    8/06/2013 4:00	65	89	58			
    8/06/2013 5:00	24	85	57			
    8/06/2013 6:00	100	86	60
    Tks
    Attached Files Attached Files
    Last edited by uimhirADo; 07-01-2013 at 04:25 PM.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: summing based on a criteria but the criteria is not the format i want

    Hi Tsk,

    Does the Pivot Table answer work for you?
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    07-17-2012
    Location
    Auckland
    MS-Off Ver
    Excel 2010
    Posts
    36

    Re: summing based on a criteria but the criteria is not the format i want

    Hi MarvinP

    That is food for thought thanks.
    But it's not exactly what I'm looking for.
    The data in hourly format feeds a chart and is already in pivot chart format that I want to keep it in (an aside maybe I can do a pivot of an existing pivot??)
    So basically I want to know how to sum based on a criteria that is not in the format that I want...
    thanks

  4. #4
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: summing based on a criteria but the criteria is not the format i want

    How about..

    =SUMPRODUCT(B$2:B$486,--(MONTH($A$2:$A$486)=6))
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  5. #5
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,625

    Re: summing based on a criteria but the criteria is not the format i want

    IN G1,H1,I1 put date 1/6/2013 and format as mmm.

    IN G2

    =SUMPRODUCT(--(MONTH($A$2:$A$2000)=MONTH(G$1)),B2:B2000)
    IN H2

    =SUMPRODUCT(--(MONTH($A$2:$A$2000)=MONTH(H$1)),C2:C2000)
    In I2
    =SUMPRODUCT(--(MONTH($A$2:$A$2000)=MONTH(I$1)),D2:D2000)

  6. #6
    Registered User
    Join Date
    07-17-2012
    Location
    Auckland
    MS-Off Ver
    Excel 2010
    Posts
    36

    Re: summing based on a criteria but the criteria is not the format i want

    Tks Ace_XL & kvsrinivasamurthy they both work.

+ 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