Formula to take a value from a row and apply it to columns representing date ranges

zoet88

New Member
Joined
Dec 16, 2018
Messages
6
[FONT=&quot]Hi,[/FONT]
[FONT=&quot]I need some help with a formula in Excel. I have a column that shows a start date and a column that shows an end date, I have combined the start and end date to come up with a date range. Each of these date ranges show a cost within the date range.[/FONT]
[FONT=&quot]I need to create separate columns for each month and the cost that falls within that date range needs to go under each column. I have attached an image and highlighted the cells yellow where I would like to apply the formula. Is this possible?[/FONT]
[FONT=&quot]Sorry if I have not explained it well, let me know if I can clarify anything.[/FONT]
[FONT=&quot]https://imgur.com/a/LGVYFLz[/FONT]
[FONT=&quot]Thank you so much![/FONT]
 
Ok, the way you converted the Text String to your Dates should have worked with my formula in Post # 7. So now, I'm wondering how you're entering the Month Columns manually, what Exactly do you Enter to get, say, January 2018 (as in F1 in my sample) ??

Besides that, it's actually rather easy to modify your LEFT, MID, and TEXT/DATE formulas to get Actual Date Values, as shown below, you no longer need the 2 Helper Columns ( 4 total ), and I've used my original formula in Post # 2 to obtain the results.

Again, if it doesn't work for you, please tell how you enter the Month Columns.
You Should, just type "January 2018" without quotes, and custom format that row as "mmmm yyyy" without quotes.


Book1
ABCDEFGHIJKL
1January 2018February 2018March 2018April 2018May 2018June 2018July 2018
220180300March 201820180500May 201855.68 55.6855.6855.68
320180200February 201820180600June 201876.3476.3476.3476.3476.3476.34
420180600June 201820180700July 201899.9999.9999.99
5
6Custom FormatCustom Format
7mmmm yyyymmmm yyyy
Sheet404
Cell Formulas
RangeFormula
B2=DATE(LEFT(A2,4),MID(A2,5,2),1)
D2=DATE(LEFT(C2,4),MID(C2,5,2),1)
F2=IF(AND(F$1>=$B2,F$1<=$D2),$E2,"")
 
Last edited:
Upvote 0

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
You're welcome, welcome to the forum.

Glad it's working for you.
 
Upvote 0

Forum statistics

Threads
1,216,102
Messages
6,128,849
Members
449,471
Latest member
lachbee

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