Formula for lookup, sum if and date range


New Member
Oct 2, 2009
I am looking for someone who is proficient in formulas to help me out. I am trying to match a date range and total sums if the row falls between the date range. I want to do this as a formula, not a macro. My file has three worksheets. In worksheet 'PT', column E (Line Description) lists the beginning and ending date range, but it is in text format with other characters at the end of the line, but the first 6 characters will always be beginning date and characters 8-13 will always be the ending date. Worksheet 'names' cross references the common data that will match the other two worksheets. Worksheet 'UNIV' lists all the raw data that needs to be totaled. I would like to create a formula in worksheet 'PT' where it grabs every line in worksheet 'UNIV' that falls within the date range for that customer and total it in the highlighted cell G2. Can someone help me?
Here is a link to a screen print of what I am looking at.

I have been trying to work on this for quite some time and can't work out the kinks for it to give me a sum total.
Thank you.

Some videos you may like

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.


Board Regular
Jul 20, 2010
Give this one a shot:


I reconstructed the first few lines of your file based on the images. It returns -177.1 for the first entry on 'PT' (BeeBee Co., 7/29/13 - 8/5/13).

Note that I've hardcoded the "20" in the year part of the date formula, assuming that all your data occurs in this century. If there's stuff from before the year 2000 the formula will require minor adjustment to work properly.


New Member
Oct 2, 2009
It works beautifully. I knew it could be done, and I have been working on this for a long time. Thank you for your help!

Watch MrExcel Video

Forum statistics

Latest member

This Week's Hot Topics

  • Finding issue in If elseif else with For each Loop
    Finding issue in If elseif else with For each Loop I have tried this below code but i'm getting in Y column filled with W005. Colud you please...
  • MsgBox Error
    Hi Guys, I have the below error show up when i try and run my macro in File1 but works fine if i copy and paste the same code into file2. [ATTACH...
    My Cell Format is [B]""0.00" Cr". [/B]But in the cell, it is showing 123.00 for editing. (123 is entry figure). (Data imported from other...
  • Show numbers nearly the same
    Is this possible. I have a number that can change very time eg 0.00001234 Then I have a lot of numbers 0.0000001, 0.0000002, 0.00000004...
  • Please i need your help to create formula
    I need a formula in cell B8 to do this >>if b1=1 then multiply ( cell b8) by 10% ,if b1=2 multiply by 20%,if=3 multiply by 30%. Thank you in...
  • Got error while adding column and filter
    Got error while adding column and filter In column Z has some like "Success" and "Error". I want to add column in AA if the Z cell value is...