+ Reply to Thread
Results 1 to 10 of 10

Sum If Forumla to some values assocated wtih months of the year

  1. #1
    Forum Contributor
    Join Date
    07-21-2013
    Location
    washington dc
    MS-Off Ver
    365 MSO
    Posts
    473

    Sum If Forumla to some values assocated wtih months of the year

    Hi-

    Please see attached spreadsheet. I am trying fill in the "Buy", and "Sell" columns in my Turnover tab. It pulls data from the Eze data tab. I want to add to the sumif formula to only add the Month in column A in the Turnover tab with the assocaiated Month data in column B in ezea data. I think the issue is the format the i download the data in. Please help me out.

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Sum If Forumla to some values assocated wtih months of the year

    Hi,

    C2:
    =SUMIFS('EZE DATA'!$V$2:$V$5000,'EZE DATA'!$B$2:$B$5000,">="&$A2,'EZE DATA'!$B$2:$B$5000,"<="&EOMONTH($A2,0),'EZE DATA'!$L$2:$L$5000,"BUY")

    Copy it to D2 and replace "Buy" with "Sell", then copy C2:D2 down
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Contributor
    Join Date
    07-21-2013
    Location
    washington dc
    MS-Off Ver
    365 MSO
    Posts
    473

    Re: Sum If Forumla to some values assocated wtih months of the year

    That formula does not work. If you go into eze data and take october number don't add, also november doesn't even pull in for buys.

  4. #4
    Forum Contributor
    Join Date
    07-21-2013
    Location
    washington dc
    MS-Off Ver
    365 MSO
    Posts
    473

    Re: Sum If Forumla to some values assocated wtih months of the year

    It may not be possible because the way the data comes in and I have to do text to columns. some of the dates change to the format example

    10/1/13
    others come in
    1/10/13

    So, I guess not possible to know if it means january or october

  5. #5
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Sum If Forumla to some values assocated wtih months of the year

    Works OK for me.

    See attached where I've already filtered the data for November Buys so that you can see the total in V agrees with the summary table.

    Obviously if your data is not consistent then that's a problem with your data and not an Excel problem. Although if you're doing a text to columns you should use the option to define the Date column as a Date rather than General or Text or whatever it might be.
    Attached Files Attached Files
    Last edited by Richard Buttrey; 11-25-2013 at 02:26 PM.

  6. #6
    Forum Contributor
    Join Date
    07-21-2013
    Location
    washington dc
    MS-Off Ver
    365 MSO
    Posts
    473

    Re: Sum If Forumla to some values assocated wtih months of the year

    Yes, I define everything as a date-DMY. It needs to be in DMY format for other forumas in my s/s that I didn't provide. In the DMY format it shows most dates in November starting with date/month, however there are days where it has month/date for november. It's the same for the other months. Any way around this, so I can pull in accurate info?

  7. #7
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Sum If Forumla to some values assocated wtih months of the year

    Hi,

    You'll need to upload your original data file, or at least the Excel file with the single column of values before you perform the TextToColumns. Make a note alongside those dates which are not consistent with the rest so that we can understand what you actually want rather than what the format shows.

  8. #8
    Forum Contributor
    Join Date
    07-21-2013
    Location
    washington dc
    MS-Off Ver
    365 MSO
    Posts
    473

    Re: Sum If Forumla to some values assocated wtih months of the year

    find attached. This is what i receive, then I text to columns-date-dmy. You can do text to column to see for yourself. If you start line 947 column B the date is consistant until line 1,045
    Attached Files Attached Files

  9. #9
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Sum If Forumla to some values assocated wtih months of the year

    hi cartica. you should be doing a MDY conversion. the deciding factor is the format your data is currently in. how you determine is to look at dates bigger than 12. months are never bigger than 12. so you can see some of the data showing numbers bigger than 12 in the middle. hence, it should be MDY. if you have to do a Text to columns every now & then, maybe this would help:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    SUMPRODUCT calculates slower though. this is assuming the date is in A2 like your first file & "Buy" in C1. otherwise, you can do a text to column & use Richard's formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  10. #10
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Sum If Forumla to some values assocated wtih months of the year

    Hi,

    I was hoping that the file you sent would be a SINGLE column of text BEFORE you convert it with TextToColumns. The file you've attached has either already been converted or that's what you actually received.

    Either way I don't see any differences in in the column B date layouts so am not sure why you think some of them are wrong.

    The problem with this is that the 'dates' are not true date numbers which Excel can use for date arithmetic. They are merely strings of data which is why ben's string slicing formula is necessary in order to coerce the strings into something Excel can use.

    If you can import or convert the numbers to proper date numbers then normal SUMIFS will work. Are you able to upload the original file which I'm presuming is a .txt file?

+ 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. [SOLVED] how to get the max,min,average values months wise from 1 year data
    By sathiyamoorthy in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-19-2013, 01:43 AM
  2. Replies: 3
    Last Post: 08-23-2011, 01:09 PM
  3. Replies: 3
    Last Post: 03-12-2009, 09:54 AM
  4. [SOLVED] Combined Months of a year into a year
    By Djchaney3 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-12-2007, 09:41 AM
  5. Replies: 1
    Last Post: 02-18-2005, 10:06 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