Index Match with Dates

mba_110

Board Regular
Joined
Nov 28, 2012
Messages
103
Office Version
  1. 365
Platform
  1. Windows
Hi Everyone,

I have following formula that calculate the amount based on dates and criteria, i used index and Match and it is working fine.

Fixed Assets - Register.xlsx
CDEFGHIJKLMNOPQRS
103LT-FA007925 Apr 202324 Apr 2024Camera Bag30.4928.5230.49 AED 89.51
Year - 2024
Cell Formulas
RangeFormula
D103D103=VLOOKUP(C103,'Asset List'!$C$12:$R$174,2,0)
E103E103=VLOOKUP(C103,'Asset Depreciation'!$C$33:$L$4524,7,0)
F103F103=VLOOKUP(C103,'Asset List'!C89:R251,4,0)
G103G103=IF(AND(D103>$G$6,C103<>'Asset Depreciation'!$C$11:$C$3623),"",IFERROR(INDEX('Asset Depreciation'!$K$11:$K$3623,MATCH(1,($G$6='Asset Depreciation'!$I$11:$I$3623)*(C103='Asset Depreciation'!$C$11:$C$3623),0)),""))
H103H103=IF(AND(D103>$H$6,C103<>'Asset Depreciation'!$C$11:$C$3623),"",IFERROR(INDEX('Asset Depreciation'!$K$11:$K$3623,MATCH(1,($H$6='Asset Depreciation'!$I$11:$I$3623)*(C103='Asset Depreciation'!$C$11:$C$3623),0)),""))
I103I103=IF(AND(D103>$I$6,C103<>'Asset Depreciation'!$C$11:$C$3623),"",IFERROR(INDEX('Asset Depreciation'!$K$11:$K$3623,MATCH(1,($I$6='Asset Depreciation'!$I$11:$I$3623)*(C103='Asset Depreciation'!$C$11:$C$3623),0)),""))
J103J103=IF(AND(D103>$J$6,C103<>'Asset Depreciation'!$C$11:$C$3623),"",IFERROR(INDEX('Asset Depreciation'!$K$11:$K$3623,MATCH(1,($J$6='Asset Depreciation'!$I$11:$I$3623)*(C103='Asset Depreciation'!$C$11:$C$3623),0)),""))
K103K103=IF(AND(D103>$K$6,C103<>'Asset Depreciation'!$C$11:$C$3623),"",IFERROR(INDEX('Asset Depreciation'!$K$11:$K$3623,MATCH(1,($K$6='Asset Depreciation'!$I$11:$I$3623)*(C103='Asset Depreciation'!$C$11:$C$3623),0)),""))
L103L103=IF(AND(D103>$L$6,C103<>'Asset Depreciation'!$C$11:$C$3623),"",IFERROR(INDEX('Asset Depreciation'!$K$11:$K$3623,MATCH(1,($L$6='Asset Depreciation'!$I$11:$I$3623)*(C103='Asset Depreciation'!$C$11:$C$3623),0)),""))
M103M103=IF(AND(D103>$M$6,C103<>'Asset Depreciation'!$C$11:$C$3623),"",IFERROR(INDEX('Asset Depreciation'!$K$11:$K$3623,MATCH(1,($M$6='Asset Depreciation'!$I$11:$I$3623)*(C103='Asset Depreciation'!$C$11:$C$3623),0)),""))
N103N103=IF(AND(D103>$N$6,C103<>'Asset Depreciation'!$C$11:$C$3623),"",IFERROR(INDEX('Asset Depreciation'!$K$11:$K$3623,MATCH(1,($N$6='Asset Depreciation'!$I$11:$I$3623)*(C103='Asset Depreciation'!$C$11:$C$3623),0)),""))
O103O103=IF(AND(D103>$O$6,C103<>'Asset Depreciation'!$C$11:$C$3623),"",IFERROR(INDEX('Asset Depreciation'!$K$11:$K$3623,MATCH(1,($O$6='Asset Depreciation'!$I$11:$I$3623)*(C103='Asset Depreciation'!$C$11:$C$3623),0)),""))
P103P103=IF(AND(D103>$P$6,C103<>'Asset Depreciation'!$C$11:$C$3623),"",IFERROR(INDEX('Asset Depreciation'!$K$11:$K$3623,MATCH(1,($P$6='Asset Depreciation'!$I$11:$I$3623)*(C103='Asset Depreciation'!$C$11:$C$3623),0)),""))
Q103Q103=IF(AND(D103>$Q$6,C103<>'Asset Depreciation'!$C$11:$C$3623),"",IFERROR(INDEX('Asset Depreciation'!$K$11:$K$3623,MATCH(1,($Q$6='Asset Depreciation'!$I$11:$I$3623)*(C103='Asset Depreciation'!$C$11:$C$3623),0)),""))
R103R103=IF(AND(D103>$R$6,$C$65<>'Asset Depreciation'!$C$11:$C$3623),"",IFERROR(INDEX('Asset Depreciation'!$K$11:$K$3623,MATCH(1,($R$6='Asset Depreciation'!$I$11:$I$3623)*(C103='Asset Depreciation'!$C$11:$C$3623),0)),""))
S103S103=SUM(G103:R103)


Cell Formulas
RangeFormula
D2476D2476=VLOOKUP(C2476,'Asset List'!$C$12:$R$176,2,0)
E2476E2476=VLOOKUP(C2476,'Asset List'!$C$12:$N$175,3,0)
F2476F2476=VLOOKUP(C2476,'Asset List'!$C$12:$N$175,4,0)
G2476G2476=VLOOKUP(C2476,'Asset List'!$C$12:$N$175,10,0)
I2476I2476=ROUND(D2476+G2476*365,0)
J2476J2476=ROUND(I2476-D2476+1,0)
L2476L2476=E2476
F2477:F2489,C2477:C2489F2477=F2476
G2477G2477=(-$G$2476/$J$2476)*J2477+$G$2476
H2477H2477=D2476
I2477:I2489I2477=IF(H2477+30<=$I$2476,EOMONTH(H2477,0),IF(H2477="","",$I$2476))
J2477:J2489J2477=ROUND(I2477-H2477+1,0)
K2477:K2489K2477=$E$2476/$J$2476*J2477
L2477:L2489L2477=L2476-K2477
G2478:G2489G2478=(-$G$2476/$J$2476)*J2478+G2477
H2478:H2489H2478=IF($I$2476>EOMONTH(I2477,0),I2477+1,"")
E2491,K2491E2491=SUBTOTAL(9,E2476:E2490)
J2491J2491=SUM(J2477:J2489)
L2491L2491=L2476-K2491


C103 is 30/04/2024

Now i want J103 should allocate the reminder amount of 23.61 as scheduled in Asset depreciation sheet since its falling during month April 2024 and C103 is mentioned 30/04/2024.

Any help will be appreciated.
 
Even i changed the end date to EOM also its not showing last value.
That means you have more than 1 value in 'Asset Depreciation'!$I$11:$I$3623 with the same month and year.
You can see in my first post there is no more than one value each line.

I think i got the problem now, EOM is used to calculate on 12 month basis but if you see in Asset Depreciation sheet the total lines are 13 and each time on 1 year calculation it ignores the 13 number line.

Again i don't know exactly what to fix in this formula even though i discover the possibility of error.
 
Last edited:
Upvote 0

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
I don't have a full understanding of your table set up. This will return the latest entry with the matching month and date.
Excel Formula:
=XLOOKUP(1,($C103='Asset Depreciation'!$C$11:$C$3623)*(EOMONTH(+'Asset Depreciation'!$I$11:$I$3623,0)=EOMONTH(J$6,0)),Asset Depreciation'!$K$11:$K$3623,"",,-1)
 
Upvote 0

Forum statistics

Threads
1,226,113
Messages
6,189,048
Members
453,522
Latest member
Seeker2025

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