If the date is matched in a group of cells then insert the contents of the cell next to date matched

davids4500

Board Regular
Joined
Jan 14, 2023
Messages
56
Office Version
  1. 365
Platform
  1. Windows
I have a date in cell B4. If the date in the cells in (OrderShipmentDates!K32:K44) match this date then insert the information in the cell to the left of cell that matches (OrderShipmentDates!J32:J44).
The dates do not follow any chronological order.
Much appreciated
David
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Hi? There is no need shouting at us ...
Which information should be added and where does it come from?
:)
 
Upvote 0
sorry no shouting intended.... just enthusiastic

the date is in B4 on sheet called Budget...
thank you

MonthlyOverviewFiguresforC&S.xlsx
ABCDEFGHIJKLMNO
29
30Scenario 1
31Order dateMentor 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 USDFumigation Plus $USDClient orders Value
32$11,075.8319-01-2025
33$0.0019-02-20250-Jan-00$0.00-$570.00
34$0.0022-03-20250-Jan-00$0.00-$570.00
35$9,933.1825-04-20250-Jan-00$0.00-$570.00
36$0.00
37$17,360.4815-07-20250-Jan-00$0.00-$570.00
38$0.00
39$8,050.0003-09-20250-Jan-00$0.00-$570.00
40$0.00
41$9,660.0004-11-20250-Jan-00$0.00
42$0.00
43$0.0020-12-2025
44Production Run$12,544.1728-06-2025
OrderShipmentDates
Cell Formulas
RangeFormula
L33:L34L33=D32
M33:M34M33=E32*0.07
L35,L41,L39,L37L35=D35
M35,M41,M39,M37M35=E35*0.07
 
Upvote 0
Just to add that the date in B4 is =DATE(YEAR(TODAY()), MONTH(TODAY()), 1). SO each month it changes to the current month.
 
Upvote 0
OK, I am not quite clear what you want to put where.

So you are comparing the cells K32:K44 on the "OrderShipmentDate" sheet to the value in cell B4 on your "Budget" sheet.
And if it matches, you want to take the value from column J of that matching row in your "OrderShipmentDate" sheet, and put it where exactly?
 
Upvote 0
OK, I am not quite clear what you want to put where.

So you are comparing the cells K32:K44 on the "OrderShipmentDate" sheet to the value in cell B4 on your "Budget" sheet.
And if it matches, you want to take the value from column J of that matching row in your "OrderShipmentDate" sheet, and put it where exactly?
I would like to put it in D13 on the "Budget" sheet.

MonthlyOverviewFiguresforC&S.xlsx
BCDE
1CASH FLOW PROJECTION
2Date OF UpdateSaturday, 11 January 2025
3Current MonthJanuary-2025
4Jan-2025January-2025
5IncomeAmount
6Total Sales for 12 months
7Total of Outstanding debtors
8Cash in everyday account
9Cash in Savings Account
10Debtors Due/Available (50%)35%
11Current Sales (25%)25%
12 Payment required this month$0.00
132nd Payment required this month
14Production Run$0.00
15Total In Savings Account For:- Jan 2025$0.00
BUdget
Cell Formulas
RangeFormula
C2C2=TODAY()
C3,B4C3=DATE(YEAR(TODAY()), MONTH(TODAY()), 1)
C4C4=B4
D12D12=IF(OR(MONTH(B4)=12,AND(MONTH(OrderShipmentDates!B32)=12,MONTH(B4)=12)),OrderShipmentDates!H32,IF(OR(MONTH(B4)=1,AND(MONTH(OrderShipmentDates!B33)=1,MONTH(B4)=1)),OrderShipmentDates!H33,IF(OR(MONTH(B4)=2,AND(MONTH(OrderShipmentDates!B34)=2,MONTH(B4)=2)),OrderShipmentDates!H34,IF(OR(MONTH(B4)=3,AND(MONTH(OrderShipmentDates!B35)=3,MONTH(B4)=3)),OrderShipmentDates!H35,IF(OR(MONTH(B4)=4,AND(MONTH(OrderShipmentDates!B36)=4,MONTH(B4)=4)),OrderShipmentDates!H36,IF(OR(MONTH(B4)=5,AND(MONTH(OrderShipmentDates!B37)=5,MONTH(B4)=5)),OrderShipmentDates!H37,IF(OR(MONTH(B4)=6,AND(MONTH(OrderShipmentDates!B38)=6,MONTH(B4)=6)),OrderShipmentDates!H38,IF(OR(MONTH(B4)=7,AND(MONTH(OrderShipmentDates!B39)=7,MONTH(B4)=7)),OrderShipmentDates!H39,IF(OR(MONTH(B4)=8,AND(MONTH(OrderShipmentDates!B40)=8,MONTH(B4)=8)),OrderShipmentDates!H40,IF(OR(MONTH(B4)=9,AND(MONTH(OrderShipmentDates!B41)=9,MONTH(B4)=9)),OrderShipmentDates!H41, IF(OR(MONTH(B4)=10,AND(MONTH(OrderShipmentDates!B42)=10,MONTH(B4)=10)),OrderShipmentDates!H42, IF(OR(MONTH(B4)=11,AND(MONTH(OrderShipmentDates!B43)=11,MONTH(B4)=11)),OrderShipmentDates!H43))))))))))))
B15B15=CalculationsInfo!J22&" "&TEXT(EDATE(B4, 0),"mmm yyyy")
D14D14=OrderShipmentDates!H44
D15D15=SUM(D9+D10+D11)-(D12+D13+D14)
 
Upvote 0
Is it possible that multiple cells match the date, so you would be adding up multiple rows?
If so, you will probably want to use a SUMIF formula.
 
Upvote 0
Is it possible that multiple cells match the date, so you would be adding up multiple rows?
If so, you will probably want to use a SUMIF formula.
Dear Joe4. Yes that could be a possibility. Good point
 
Upvote 0
Then I think your formula should look something like this:
Excel Formula:
=SUMIF(OrderShipmentDates!K32:K44,Budget!B4,OrderShipmentDates!J32:J44)
 
Upvote 0

Forum statistics

Threads
1,225,759
Messages
6,186,864
Members
453,380
Latest member
ShaeJ73

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