Date range formula

Jaxs1111

New Member
Joined
Jul 10, 2022
Messages
7
Office Version
  1. 365
Platform
  1. Windows
Hello, I need help in creating a formula under columns, D,E, and F that will bring in the values in column L which is hidden.

In example: Under Column BC July month
I would like a formula to Look at the dates in column J "Crew End Date"
and if the dates fall in between 7/1 and 7/31 then bring in the value in column L (which is hidden here) into cell BC and the corresponding
Obviously to add an error function where if dates are not entered in Crew End Date column then leave blank.

Hope this makes sense. The highlighted numbers below I typed in to show what I would like for the formula to show.



1657502353015.png
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Welcome to the MrExcel board!

This would help in the future to save helpers having to manually type sample data. :)
MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.


See if this helps. Note that my dates are in d/m/y format

22 07 11.xlsm
JKLBBBCBDBEBF
51/07/20221/08/20221/09/20221/10/2022
631/07/202231/08/202230/09/202231/10/2022
715/07/202211   
825/08/20222 2  
91/05/20223    
101/07/202244   
1131/10/20225   5
Month Values
Cell Formulas
RangeFormula
BC7:BF11BC7=IF($J7=MEDIAN($J7,BC$5,BC$6),$L7,"")
 
Upvote 0
Based on the headings provided, just using EOMonth would work as well.

20220711 If date put in column Jaxs1111.xlsx
JKLMBBBCBD
5
6Crew End DateSubstantial CompletionCol L Hidden31/07/202231/08/2022
7
8
927/07/202210,000.0010,000.00-
1025/08/20225,000.00-5,000.00
111,000.00--
12
Sheet1
Cell Formulas
RangeFormula
BC9:BD11BC9=IF(EOMONTH($J9,0)=BC$6,$L9,0)
 
Upvote 0
THANK YOU ALEX!! This worked!!!!! That helped!

What if I needed to take into consideration (Crew Start Date and End Date) and allocate the current month's revenue.
For example, The high-lighted dates have a revenue of 1341542.10. What is the best way to allocate the amount between the three columns?



1657542388048.png
 

Attachments

  • 1657542161788.png
    1657542161788.png
    74 KB · Views: 1
Upvote 0
See if this is what you had in mind:

20220711 If date put in column Jaxs1111.xlsx
IJKLMBBBCBDBEBFBGBH
51/07/20221/08/20221/09/20221/10/20221/11/2022
6Crew Start DateCrew End DateSubstantial CompletionCol L Hidden31/07/202231/08/202230/09/202231/10/202230/11/2022Total
7
8
910/07/202227/09/202210,000.002,658.233,924.053,417.72--10,000.00
1010/07/202225/09/20225,000.001,363.642,012.991,623.38--5,000.00
115/08/202210/08/20221,000.00-1,000.00---1,000.00
1210/07/202225/09/202215,000.004,090.916,038.964,870.13--15,000.00
Apportion
Cell Formulas
RangeFormula
BC5:BG5BC5=EOMONTH(BC6,-1)+1
BC9:BG12BC9=IF(AND($I9<>"",$J9<>""),$L9/($J9-$I9)*(BC$5=MEDIAN(EOMONTH($I9,-1)+1,EOMONTH($J9,0),BC$5))*(MIN($J9,EOMONTH(BC$5,0))-MAX($I9,BC$5-1)),0)
BH9:BH12BH9=SUM(BC9:BG9)


For an explanation see: https://www.myonlinetraininghub.com/excel-formula-to-spread-income-or-costs-over-months
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,733
Members
448,987
Latest member
marion_davis

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