date range and value return

bennyis2010

New Member
Joined
Sep 4, 2016
Messages
2
hi guys,
I am stuck on an excel problem.
I have thousands of cells of data.
In one column I have manually entered dates. Sometimes the date is a single day (1/1/2003). Other times it is a manually entered date range (1/1/2003-5/1/2003). A few columns later each entry has a numerical value to capture the scale of something I am measuring. The numbers are like: 10, 126, 480; and so on.
Elsewhere in the spread sheet I want to return a single value for the sum of all the numbers that correspond to a specific date,
So for example,

TAB 1
DATE VALUE
1/1/2003 20
1/1/2003-5/1/2003 10 (i.e. 10 per day)
1/1/2003-20/6/2007 10 (i.e. 10 per day)
and so on....

TAB 2
DATE VALUE (I need the formula to calculate below)
1/1/2003 40
2/1/2003 20
3/1/2003 20
4/1/2003 20
5/1/2003 20
6/1/2003 10

Is that clear?
Can you help me with that?

ben
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
With text to columns you can split the dash delimited cells, F5-special-blanks, type = left arrow, ctrl-enter, then:


Excel 2010
ABC
1DateNumber
21/1/20031/1/200320
31/1/20031/5/200310
41/1/20036/20/200710
5
6
71/1/200340
81/2/200320
91/3/200320
101/4/200320
111/5/200320
121/6/200310
Sheet7 (2)
Cell Formulas
RangeFormula
B7=SUMIFS($C$2:$C$4,$A$2:$A$4,"<="&A7,$B$2:$B$4,">="&A7)
 
Upvote 0
Thank you.
This worked perfectly. Much appreciated.

I wonder if you can help me take this one step further.

Imagine I want to do exactly the same thing as above, but add one extra element.

I want to add values for a variety of dates and date ranges (as above) but ONLY for those with a certain value in another column.

How would I add an additional clause to the above formula to only return the total value for those within the dates specified and that contain in another column, for example the text "Apples" (bot not other words like "Oranges" etc).

Your help is greatly appreciated.

ben
 
Upvote 0
This:


Excel 2010
ABCD
1FruitDateNumber
2Oranges1/1/20031/1/200320
3Apples1/1/20031/5/200310
4Oranges1/1/20036/20/200710
5
6
71/1/200310
81/2/200310
91/3/200310
101/4/200310
111/5/200310
121/6/20030
Sheet7 (2)
Cell Formulas
RangeFormula
B7=SUMIFS($D$2:$D$4,$B$2:$B$4,"<="&A7,$C$2:$C$4,">="&A7,$A$2:$A$4,"Apples")
 
Upvote 0

Forum statistics

Threads
1,216,087
Messages
6,128,738
Members
449,466
Latest member
Peter Juhnke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top