+ Reply to Thread
Results 1 to 12 of 12

formula to search text from another sheet and add the sum based on a date range

  1. #1
    Registered User
    Join Date
    02-10-2014
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    5

    formula to search text from another sheet and add the sum based on a date range

    Hi All,

    I'm trying to create a formula that will search for a specific text in "sheet1" within a date range and then SUM the total on "sheet2". I've manage to use the SUMPRODUCT (below) formula but want to expand on this so the SUM can be shown on another sheet(summary page). =SUMPRODUCT((ISNUMBER(FIND({"nmlclex06"},A1:A10)))*(B1:B10)) In this example I search for the text "nmlclex06" and SUM the size, but don't have a date range and don't know how to SUM the data on another sheet. Can someone please assist?



    Columns: Name, Size, Date
    nmlclex06 1 14/12/2013
    nmlclap12 10 12/12/2013
    nmlclex06 5 1/10/2013
    nmlclex06 1 9/10/2013
    nmlclex06 1 1/01/2014
    nmlclap12 1 24/10/2013
    nmlclex06 1 13/11/2013
    nmlclap12 1 18/12/2013
    nmlclap12 1 9/12/2013
    nmlclap12 1 30/12/2013

    Thanks.

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: formula to search text from another sheet and add the sum based on a date range

    Hi Billyngu,

    Welcome to the forum

    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    02-10-2014
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: formula to search text from another sheet and add the sum based on a date range

    Hi Six,

    Thanks for the response. I've attached a workbook sample with comments. The workbook has 3 sheets; data, requirement(before), intended result(after).

    Thanks.
    Attached Files Attached Files

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: formula to search text from another sheet and add the sum based on a date range

    In B2 Cell of Summary sheet

    =SUMIFS(Table1[[#All],[Size]],Table1[[#All],[Name]],"*"&$A2&"*",Table1[[#All],[Date]],">="&VALUE(1&"-"&SUBSTITUTE(TRIM(REPLACE(B$1,1,SEARCH("For",B$1)+3,""))," ","-")),Table1[[#All],[Date]],"<="&EOMONTH(VALUE(1&"-"&SUBSTITUTE(TRIM(REPLACE(B$1,1,SEARCH("For",B$1)+3,""))," ","-")),0))

    Drag it down and right....

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: formula to search text from another sheet and add the sum based on a date range

    here is another option.

    1st, change the headings in the summary table to actual dates (10/1/2013, 11/1/2013 etc). Then use this, copied across and down...

    =SUMIFS(Data!$C:$C,Data!$A:$A,'Summary(before)'!$A2,Data!$B:$B,">="&B$1,Data!$B:$B,"<"&EDATE(B$1,1))

    edit: @ Six, did I meantion I hate how excel structures the references in a table? lol
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  6. #6
    Registered User
    Join Date
    02-10-2014
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: formula to search text from another sheet and add the sum based on a date range

    Hi Six,

    Thanks for that. The sum value from the formula to what is expected doesn't seem to match. I verified this by using the filter. On the Data sheet, If I do a manual filter on "Name:nmlclex03" and date range for 1/10/2013 to 31/10/2013 and SUM up , the value is not the same. Am i missing something?

    Thanks.

  7. #7
    Registered User
    Join Date
    02-10-2014
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: formula to search text from another sheet and add the sum based on a date range

    HI Fdibbins,

    I like you alternative, thank you, but the value still doesn't seem to match the filtered SUM as per my previous msg to Six. Any ideas?

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: formula to search text from another sheet and add the sum based on a date range

    Im not sure which answers you are looking at...
    A
    B
    C
    D
    E
    F
    G
    1
    Name
    1-Oct-2013
    1-Nov-2013
    1-Dec-2013
    1-Jan-2014
    2
    nmlclex03
    76795.575
    68241.646
    79930.322
    75581.135
    Expected results: B2 =76795.575, C2=68241.646

  9. #9
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: formula to search text from another sheet and add the sum based on a date range

    Quote Originally Posted by FDibbins View Post
    @ Six, did I meantion I hate how excel structures the references in a table? lol
    I also felt uncomfortable, the way excel creates references to table but any how I have the habit of hitting Ctrl+Spacebar for selecting the whole column references which automatically created the table references instead of whole column references

  10. #10
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: formula to search text from another sheet and add the sum based on a date range

    Agreed, my friends!

    Structured References are one of the few 'improvements' in later versions of Excel that I think are simply more hassle than they're worth, and I personally avoid them like the plague!
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  11. #11
    Registered User
    Join Date
    02-10-2014
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: formula to search text from another sheet and add the sum based on a date range

    Thanks Fdibbins. I had the dates set incorrectly.

    Cheers!

  12. #12
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: formula to search text from another sheet and add the sum based on a date range

    you'r welcome. If this answered your question, please take a moment to mark the thread as "solved" - it helps keep things neat and tidy lol, and consider adding the reputation to those that helped (see points 2 & 3 below my 1st post to you)

+ 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. Dialogue box to search date range of table column, copy relevant rows to report sheet
    By Tim Newton in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 08-26-2013, 03:10 AM
  2. Replies: 2
    Last Post: 06-19-2013, 03:23 AM
  3. [SOLVED] Don't understand & sign for date range search in formula, is this correct?
    By boo1952 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-14-2012, 12:24 PM
  4. Replies: 3
    Last Post: 08-16-2012, 03:25 PM
  5. Formula to search for today's date and return range of data
    By paramore in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-15-2012, 02:17 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