Hi Tkrajutkraju,
Thanks for contacting us,
To achieve this task in Excel, you can use a combination of formulas like SUMIFS, INDEX, MATCH, and LARGE for finding the top 5 largest and smallest expenses for a given month. Here's a step-by-step guide:
Assuming your data starts from cell A1 and your headers are in row 1, and the month you want to analyze is in cell H1, you can follow these steps:
- **Calculate Total Expenses for Each Transaction Type:**
In cell I2, enter the following formula to calculate the total expenses for "CASH DEBITS" excluding "TRNA":
=SUMIFS(C:C, A:A, ">="&DATEVALUE("01-"&H1&"-2023"), A:A, "<="&EOMONTH(DATEVALUE("01-"&H1&"-2023"),0), G:G, "<>TRNA")
In cell J2, enter the following formula to calculate the total expenses for "ONLINE DEBITS" excluding "TRNA":
=SUMIFS(E:E, A:A, ">="&DATEVALUE("01-"&H1&"-2023"), A:A, "<="&EOMONTH(DATEVALUE("01-"&H1&"-2023"),0), G:G, "<>TRNA")
- **Find Top 5 Largest Expenses:**
In cell K2, enter the following formula to find the top 5 largest expenses for "CASH DEBITS":
=INDEX(C:C, MATCH(LARGE(IF((A:A>=DATEVALUE("01-"&H1&"-2023"))\*(A:A<=EOMONTH(DATEVALUE("01-"&H1&"-2023"),0))\*(G:G<>"TRNA"), C:C), ROW(INDIRECT("1:5"))), IF((A:A>=DATEVALUE("01-"&H1&"-2023"))\*(A:A<=EOMONTH(DATEVALUE("01-"&H1&"-2023"))\*(G:G<>"TRNA")), C:C), 0))
In cell L2, enter the following formula to find the top 5 largest expenses for "ONLINE DEBITS":
=INDEX(E:E, MATCH(LARGE(IF((A:A>=DATEVALUE("01-"&H1&"-2023"))\*(A:A<=EOMONTH(DATEVALUE("01-"&H1&"-2023"))\*(G:G<>"TRNA")), E:E), ROW(INDIRECT("1:5"))), IF((A:A>=DATEVALUE("01-"&H1&"-2023"))\*(A:A<=EOMONTH(DATEVALUE("01-"&H1&"-2023"))\*(G:G<>"TRNA")), E:E), 0))
- **Find Top 5 Smallest Expenses:**
In cell M2, enter the following formula to find the top 5 smallest expenses for "CASH DEBITS":
=INDEX(C:C, MATCH(SMALL(IF((A:A>=DATEVALUE("01-"&H1&"-2023"))\*(A:A<=EOMONTH(DATEVALUE("01-"&H1&"-2023"))\*(G:G<>"TRNA")), C:C), ROW(INDIRECT("1:5"))), IF((A:A>=DATEVALUE("01-"&H1&"-2023"))\*(A:A<=EOMONTH(DATEVALUE("01-"&H1&"-2023"))\*(G:G<>"TRNA")), C:C), 0))
In cell N2, enter the following formula to find the top 5 smallest expenses for "ONLINE DEBITS":
=INDEX(E:E, MATCH(SMALL(IF((A:A>=DATEVALUE("01-"&H1&"-2023"))\*(A:A<=EOMONTH(DATEVALUE("01-"&H1&"-2023"))\*(G:G<>"TRNA")), E:E), ROW(INDIRECT("1:5"))), IF((A:A>=DATEVALUE("01-"&H1&"-2023"))\*(A:A<=EOMONTH(DATEVALUE("01-"&H1&"-2023"))\*(G:G<>"TRNA")), E:E), 0))
Make sure to enter these formulas in the respective cells and adjust cell references as needed based on your data layout.
Let me know if this helps or if you need further clarifications.
Regards,
Sola
“Give back to the Community. Help the next person who has this issue by indicating if this reply solved your problem. Click Yes or No below. “
Kindly note that this is a user to user forum, we are users helping other users, we aren't Microsoft employee neither are we Microsoft agents.