If this cell = this date and that cell = this date then enter data form this cell

davids4500

Board Regular
Joined
Jan 14, 2023
Messages
55
Office Version
  1. 365
Platform
  1. Windows
I need a formula where I have 2 cells with date information which must correspond before i enter the contents of another cell.
The formual is in F2.
If B4 = January(Date format dd/mm/yyyy) and D4 = January (Date format dd/mm/yyyy), then enter contents of cell Z45.
Much appreciated
David
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
=AND(B4= January(Date format dd/mm/yyyy), D4 = January(Date format dd/mm/yyyy) )
But not sure - Are you just making sure both cells = January
OR that both cells are the same date
if same DATE
then
=B4=D4 would do

if they are both dates in the cells B4 and D4
and you want to match Month and Year

And(MONTH(B4)=Month(D4) , Year(B4) = Year(D4))

=IF( AND(B4= January(Date format dd/mm/yyyy), D4 = January(Date format dd/mm/yyyy) ) , Z45 , "")

If its text , then need to see the format really , so
Therefore -

A SMALL sample spreadsheet, around 10-20 rows, would help a lot here, with all sensitive data removed, and expected results mocked up and manually entered, with a few notes of explanation.

This will possibly enable a quicker and more accurate solution for you.

MrExcel has a tool called “XL2BB” that lets you post samples of your data and will allow us to copy/paste your sample data into our Excel spreadsheets, saving a lot of time.

You can also test to see if it works ok, in the "Test Here" forum.

OR if you cannot get XL2BB to work, or have restrictions on your PC

then put the sample spreadsheet onto a share

I only tend to goto OneDrive, Dropbox or google docs , as I'm never certain of other random share sites and possible virus.
Please make sure you have a representative data sample and also that the data has been desensitised, remember this site is open to anyone with internet access to see - so any sensitive / personal data should be removed

Make sure you set any share or google to share to everyone
 
Upvote 0
Solution
=AND(B4= January(Date format dd/mm/yyyy), D4 = January(Date format dd/mm/yyyy) )
But not sure - Are you just making sure both cells = January
OR that both cells are the same date
if same DATE
then
=B4=D4 would do

if they are both dates in the cells B4 and D4
and you want to match Month and Year

And(MONTH(B4)=Month(D4) , Year(B4) = Year(D4))

=IF( AND(B4= January(Date format dd/mm/yyyy), D4 = January(Date format dd/mm/yyyy) ) , Z45 , "")

If its text , then need to see the format really , so
Therefore -

A SMALL sample spreadsheet, around 10-20 rows, would help a lot here, with all sensitive data removed, and expected results mocked up and manually entered, with a few notes of explanation.

This will possibly enable a quicker and more accurate solution for you.

MrExcel has a tool called “XL2BB” that lets you post samples of your data and will allow us to copy/paste your sample data into our Excel spreadsheets, saving a lot of time.

You can also test to see if it works ok, in the "Test Here" forum.

OR if you cannot get XL2BB to work, or have restrictions on your PC

then put the sample spreadsheet onto a share

I only tend to goto OneDrive, Dropbox or google docs , as I'm never certain of other random share sites and possible virus.
Please make sure you have a representative data sample and also that the data has been desensitised, remember this site is open to anyone with internet access to see - so any sensitive / personal data should be removed

Make sure you set any share or google to share to everyone
Thank you for the instructions. I have included the xl2bb and to accomadate that I have changed the cells for the formula.
The formula is now If B4 = January and D5 = January , then enter contents of cell H20.

If B4 = January(Date format dd/mm/yyyy) and D4 = January (Date format dd/mm/yyyy), then enter contents of cell Z45.
TrialMonthlyOverviewFiguresforC&S.xlsx
ABCDEFGHIJKLM
1C&S CASH FLOW PROJECTION
2Date OF UpdateFriday, 27 December 2024
3Current MonthDecember-2024Order date
4Dec-2024December-20241/12/2024
5Income1/01/2025Amount
6Total Sales for 12 months7/03/2025
7Total of Outstanding debtors27/05/2025
8Cash in everyday account16/07/2025
9Cash in Savings Account16/09/2025
10Debtors Due/Available (50%)50%
11Current Sales (25%)
12Mentor Payment required this month
13Mentor Payment required this month$0.00
14$0.00
15
16
17
18AMentor Cut off date Based on SCArrival Date + 7 weeksOrder Value $USDOrder Value $AUDFirst Payment $USDFirst payment $AUD2nd payment $USD2nd payment $AUD2nd payment DateFreight payment DueFreight Amount USD
1930/11/202419-Jan-25$34,397.00$54,691.23$27,517.60$43,752.98$6,879.40$0.0019-Jan-2519-Jan-25$2,407.79
2028/12/202419-Feb-25$23,868.04$37,950.18$19,094.43$30,360.15$4,773.61$0.0019-Feb-2519-Feb-25$1,670.76
217/02/202525-Apr-25$38,884.00$61,825.56$31,107.20$49,460.45$7,776.80$0.0025-Apr-2525-Apr-25$2,721.88
221/06/202515-Jul-25$30,000.00$47,700.00$24,000.00$38,160.00$6,000.00$0.0015-Jul-2515-Jul-25$2,100.00
2321/07/20253-Sep-25$25,000.00$39,750.00$20,000.00$31,800.00$5,000.00$0.003-Sep-253-Sep-25$1,750.00
2421/09/20254-Nov-25$30,000.00$47,700.00$24,000.00$38,160.00$6,000.00$0.004-Nov-254-Nov-25$2,100.00
BUdget
Cell Formulas
RangeFormula
C2C2=TODAY()
C3C3=B4
B4B4=DATE(YEAR(TODAY()), MONTH(TODAY()), 1)
C4C4=B4
F14F14=SUM(F9+F10+F11)-(F12+F13)
F19:F24,H19:H24F19=E19*1.59
 
Upvote 0
Thank you for the instructions. I have included the xl2bb and to accomadate that I have changed the cells for the formula.
The formula is now If B4 = January and D5 = January , then enter contents of cell H20.

If B4 = January(Date format dd/mm/yyyy) and D4 = January (Date format dd/mm/yyyy), then enter contents of cell Z45.
TrialMonthlyOverviewFiguresforC&S.xlsx
ABCDEFGHIJKLM
1C&S CASH FLOW PROJECTION
2Date OF UpdateFriday, 27 December 2024
3Current MonthDecember-2024Order date
4Dec-2024December-20241/12/2024
5Income1/01/2025Amount
6Total Sales for 12 months7/03/2025
7Total of Outstanding debtors27/05/2025
8Cash in everyday account16/07/2025
9Cash in Savings Account16/09/2025
10Debtors Due/Available (50%)50%
11Current Sales (25%)
12Mentor Payment required this month
13Mentor Payment required this month$0.00
14$0.00
15
16
17
18AMentor Cut off date Based on SCArrival Date + 7 weeksOrder Value $USDOrder Value $AUDFirst Payment $USDFirst payment $AUD2nd payment $USD2nd payment $AUD2nd payment DateFreight payment DueFreight Amount USD
1930/11/202419-Jan-25$34,397.00$54,691.23$27,517.60$43,752.98$6,879.40$0.0019-Jan-2519-Jan-25$2,407.79
2028/12/202419-Feb-25$23,868.04$37,950.18$19,094.43$30,360.15$4,773.61$0.0019-Feb-2519-Feb-25$1,670.76
217/02/202525-Apr-25$38,884.00$61,825.56$31,107.20$49,460.45$7,776.80$0.0025-Apr-2525-Apr-25$2,721.88
221/06/202515-Jul-25$30,000.00$47,700.00$24,000.00$38,160.00$6,000.00$0.0015-Jul-2515-Jul-25$2,100.00
2321/07/20253-Sep-25$25,000.00$39,750.00$20,000.00$31,800.00$5,000.00$0.003-Sep-253-Sep-25$1,750.00
2421/09/20254-Nov-25$30,000.00$47,700.00$24,000.00$38,160.00$6,000.00$0.004-Nov-254-Nov-25$2,100.00
BUdget
Cell Formulas
RangeFormula
C2C2=TODAY()
C3C3=B4
B4B4=DATE(YEAR(TODAY()), MONTH(TODAY()), 1)
C4C4=B4
F14F14=SUM(F9+F10+F11)-(F12+F13)
F19:F24,H19:H24F19=E19*1.59
[/RA
Cell Formulas
RangeFormula
Thank you etaf...all worked out much appreciated
 
Upvote 0
you are welcome, glad it worked for you
 
Upvote 0

Forum statistics

Threads
1,225,495
Messages
6,185,323
Members
453,287
Latest member
Emeister

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