+ Reply to Thread
Results 1 to 12 of 12

compare dates and sum unique values

  1. #1
    Forum Contributor meus's Avatar
    Join Date
    11-25-2014
    Location
    kathmandu
    MS-Off Ver
    2010/ 2013
    Posts
    287

    compare dates and sum unique values

    Hey all!

    I have two tables in a worksheet. There is a date in both the table. What i want to do is that compare the date between two tables and if the date in table 1 is unique to table 2, take that value and add all the unique..

    I have attached the sheet, where it will be more clear to understand..

    Any help will be appreciated.

    Thanks.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: compare dates and sum unique values

    assuming your table lengths are same then
    in k9 copy paste below
    =SUMPRODUCT(ISNA(MATCH(Table1[Date],Table2[Date],0))*Table1[Amount])
    in K10
    =SUMPRODUCT(ISNA(MATCH(Table2[Date],Table1[Date],0))*Table2[Amount])
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    WANT TO SAY THANKS, HIT ADD REPUTATION (*) AT THE BOTTOM LEFT CORNER OF THE POST

    More we learn about excel, more it shows us, how less we know about it.

    for chemistry
    https://www.youtube.com/c/chemistrybyshivaansh

  3. #3
    Forum Contributor meus's Avatar
    Join Date
    11-25-2014
    Location
    kathmandu
    MS-Off Ver
    2010/ 2013
    Posts
    287

    Re: compare dates and sum unique values

    .

    Thanks.. It works Great
    Last edited by meus; 01-26-2016 at 06:20 AM.

  4. #4
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: compare dates and sum unique values

    you are welcome Meus and thanks for rep

  5. #5
    Forum Contributor meus's Avatar
    Join Date
    11-25-2014
    Location
    kathmandu
    MS-Off Ver
    2010/ 2013
    Posts
    287

    Re: compare dates and sum unique values

    Hey thanks

    It works great as above but can u help little more on same case please?
    Now, i have another more column in each table "Particulars"..

    Before we just compared dates from two tables and SUM the unique date values... Now i want to compare the date as well as the particulars.. If the date is same but the Particular is not same, it should also be added..

    Can this be done??

    Please find the attached...

    Thanks a lot
    Attached Files Attached Files

  6. #6
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: compare dates and sum unique values

    Please Login or Register  to view this content.
    Try the above formula
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  7. #7
    Forum Contributor meus's Avatar
    Join Date
    11-25-2014
    Location
    kathmandu
    MS-Off Ver
    2010/ 2013
    Posts
    287

    Re: compare dates and sum unique values

    Nop.. it is not correct...

    Thank you anyway..

  8. #8
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,937

    Re: compare dates and sum unique values

    You just need to add a more argument in post# 3 formula.

    M9=SUMPRODUCT(ISNA(MATCH(Table1[Date],Table2[Date],0))*(Table1[Particulars]<>Table2[Particulars])*Table1[Amount])
    M10=SUMPRODUCT(ISNA(MATCH(Table2[Date],Table1[Date],0))*(Table2[Particulars]<>Table1[Particulars])*Table2[Amount])
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  9. #9
    Forum Contributor meus's Avatar
    Join Date
    11-25-2014
    Location
    kathmandu
    MS-Off Ver
    2010/ 2013
    Posts
    287

    Re: compare dates and sum unique values

    Hi Sukla Ankur,

    The formula is behaving as same as post number 2.
    It is just summarizing the unique dates, now it should consider both dates and particulars to be unique..

    For table1 result should be 192000 i.e M9 Value

    Hope this makes sense..

    Thanks

  10. #10
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,937

    Re: compare dates and sum unique values

    Try

    M9=SUMPRODUCT(ISNA(MATCH(Table1[Particulars]&Table1[Date],INDEX(Table2[Particulars]&Table2[Date],),0))*Table1[Amount])

  11. #11
    Forum Contributor meus's Avatar
    Join Date
    11-25-2014
    Location
    kathmandu
    MS-Off Ver
    2010/ 2013
    Posts
    287

    Re: compare dates and sum unique values

    Thank you.. thats what i wanted... Thanks a lot..

  12. #12
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,937

    Re: compare dates and sum unique values

    Glad to help you and thanks for feedback

+ 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. Need to compare two columns and highlight unique values.
    By @jerry in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 08-06-2015, 03:20 AM
  2. [SOLVED] compare dates in column with unique date on current month
    By bmbalamurali in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-23-2015, 06:05 AM
  3. Compare and identify unique values from different workbooks
    By la_chua29 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-28-2015, 01:44 AM
  4. Compare Columns & Highlight Unique Values
    By TheExcelNewbie in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-21-2015, 10:06 AM
  5. [SOLVED] Compare 2 columns and make a third with unique values
    By danedw in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-11-2014, 11:14 PM
  6. Compare and copy unique values
    By sa02000 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-12-2006, 04:45 PM
  7. Compare 2 columns for unique values
    By Jim Gregg in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-10-2006, 12:40 PM

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