Lookup Amount Varies For Specific Category

MrDB4Excel

Active Member
Joined
Jan 29, 2004
Messages
334
Office Version
  1. 2013
Platform
  1. Windows
I have a worksheet that utilizes several functions to get data depending on other information.
One “Category” inputs Mobile Phone based on the amount of a given month’s expense.
This amount can vary as you can see by the attached Xl2bb.
Is there some way whenever the monthly Mobile expense differs from the norm that the Category indicates “Mobile Phone” in lieu of “Miscellaneous”?
In addition note the presence of the I$9 portion of the formula: =IF(E4=“”,IFERROR(INDEX(L$3:L$9,MATCH(F4,M$3:M$9,0)),I$9),”Income”) which occurs in all cells D4 thru D30. What is the significance or reason for this part of the formula? It seems redundant for no particular reason. Perhaps there is a better solution to this part of the formula? Also what part does the ,0 play in the portion: (F4,M$3:M$9,0)?

Bogus2EasyAccounting2022.xlsx
ABCDEF
1DateTransaction DescriptionPayment AmountDepositBalance
2MonthDateDescriptionDebitsIncomeBalance
31Jan/01/2022January Starting Balance$5,000.00
41Jan/06/2022$ Cash deposit$2,000.00$7,000.00
51Jan/06/2022January 2022 Health Insurance$100.00$6,900.00
61Jan/06/2022January 2022 Health Insurance$100.00$6,800.00
71Jan/14/2022Electricity for January 2022$110.00$6,690.00
81Jan/14/2022Cellar Storage for January 2022$50.00$6,640.00
91Jan/14/2022Utilities for January 2022$120.00$6,520.00
102Feb/09/202201-Mobile-Jan.pdf$40.00$6,480.00
112Feb/07/2022$ Cash deposit$2,000.00$8,480.00
122Feb/06/2022February 2022 Health Insurance$100.00$8,380.00
132Feb/06/2022February 2022 Health Insurance$100.00$8,280.00
142Feb/14/2022Electricity for February 2022$110.00$8,170.00
15Feb/14/2022Cellar Storage for February 2022$50.00$8,120.00
162Feb/14/2022Utilities for February 2022$120.00$8,000.00
173Mar/08/202202-Mobile-Feb.pdf$40.00$7,960.00
183Mar/07/2022$ Cash deposit$2,000.00$9,960.00
193Mar/06/2022March 2022 Health Insurance$100.00$9,860.00
203Mar/06/2022March 2022 Health Insurance$100.00$9,760.00
213Mar/14/2022Electricity for March 2022$110.00$9,650.00
223Mar/14/2022Cellar Storage for March 2022$50.00$9,600.00
233Mar/14/2022Utilities for March 2022$120.00$9,480.00
244Apr/08/202203-Mobile-Mar.pdf$40.00$9,440.00
254Apr/07/2022$ Cash deposit$2,000.00$11,440.00
264Apr/07/2022March 2022 Health Insurance$100.00$11,340.00
274Apr/06/2022March 2022 Health Insurance$100.00$11,240.00
284Apr/14/2022Electricity for March 2022$110.00$11,130.00
294Apr/14/2022Cellar Storage for March 2022$50.00$11,080.00
304Apr/14/2022Utilities for March 2022$120.00$10,960.00
Expenses
Cell Formulas
RangeFormula
A16:A30,A3:A14A3=MONTH(B3)
F4:F30F4=SUM(F3+[@Income]-[@Debits])


Bogus2AutomatedMonthlyBudget.xlsx
ABCDEFGHIJKLMN
1DateTransaction DescriptionDepositPayment AmountBalance
2MonthDateDescriptionCategoryIncomeDebitsBalance1Regular Monthly or Annual ExpenseAmount
31Jan/01/2022January Starting BalanceMiscellaneous$0.00$5,000.00IncomeJan/01/2022JanuaryAARP100.00R2
41Jan/06/2022$ Cash depositIncome$2,000.00$7,000.00AARPFeb/01/2022FebruaryBsmt Stge50.00R3
51Jan/06/2022January 2022 Health InsuranceAARP $100.00$6,900.00ElectricityMar/01/2022MarchElectricity110.00R4
61Jan/06/2022January 2022 Health InsuranceAARP $100.00$6,800.00Bsmt StgeApr/01/2022AprilBuilding Utilities120.00R5
71Jan/14/2022Electricity for January 2022Electricity $110.00$6,690.00Building UtilitiesMay/01/2022MayMonthly Internet80.00R6
81Jan/14/2022Cellar Storage for January 2022Bsmt Stge $50.00$6,640.00Mobile PhoneJun/01/2022JuneMobile Phone40.00R7
91Jan/14/2022Utilities for January 2022Building Utilities $120.00$6,520.00MiscellaneousJul/01/2022JulyIncome2000.00R8
102Feb/09/202201-Mobile-Jan.pdfMobile Phone $40.00$6,480.00Monthly InternetAug/01/2022AugustR9
112Feb/07/2022$ Cash depositIncome$2,000.00 $8,480.00Property TaxSep/01/2022SeptemberR10
122Feb/06/2022February 2022 Health InsuranceAARP $100.00$8,380.00Oct/01/2022OctoberR11
132Feb/06/2022February 2022 Health InsuranceAARP $100.00$8,280.00Nov/01/2022NovemberR12
142Feb/14/2022Electricity for February 2022Electricity $110.00$8,170.00Dec/01/2022DecemberR13
152Feb/14/2022Cellar Storage for February 2022Bsmt Stge $50.00$8,120.00R14
162Feb/14/2022Utilities for February 2022Building Utilities $120.00$8,000.00
173Mar/08/202202-Mobile-Feb.pdfMobile Phone $40.00$7,960.00
183Mar/07/2022$ Cash depositIncome$2,000.00 $9,960.00
193Mar/06/2022March 2022 Health InsuranceAARP $100.00$9,860.00
203Mar/06/2022March 2022 Health InsuranceAARP $100.00$9,760.00
213Mar/14/2022Electricity for March 2022Electricity $110.00$9,650.00
223Mar/14/2022Cellar Storage for March 2022Bsmt Stge $50.00$9,600.00
233Mar/14/2022Utilities for March 2022Building Utilities $120.00$9,480.00
244Apr/08/202203-Mobile-Mar.pdfMiscellaneous $35.00$9,445.00
254Apr/07/2022$ Cash depositIncome$2,000.00 $11,445.00
264Apr/07/2022March 2022 Health InsuranceAARP $100.00$11,345.00
274Apr/06/2022March 2022 Health InsuranceAARP $100.00$11,245.00
284Apr/14/2022Electricity for March 2022Electricity $110.00$11,135.00
294Apr/14/2022Cellar Storage for March 2022Bsmt Stge $50.00$11,085.00
304Apr/14/2022Utilities for March 2022Building Utilities $120.00$10,965.00
2022
Cell Formulas
RangeFormula
A3:A30A3=IF((ISERROR(MONTH('2022'!$B3)))," ",(MONTH('2022'!$B3)))
B3:B30B3=IF(ISBLANK([Bogus2EasyAccounting2022.xlsx]Expenses!$B3)," ",([Bogus2EasyAccounting2022.xlsx]Expenses!$B3))
C3:C30C3=IF(ISBLANK([Bogus2EasyAccounting2022.xlsx]Expenses!$C3)," ",([Bogus2EasyAccounting2022.xlsx]Expenses!$C3))
D4:D30D4=IF(E4="",IFERROR(INDEX(L$3:L$9,MATCH(F4,M$3:M$9,0)),I$9),"Income")
E4:E30E4=IF(ISBLANK([Bogus2EasyAccounting2022.xlsx]Expenses!$E4),"",([Bogus2EasyAccounting2022.xlsx]Expenses!$E4))
F25:F30,F5:F23F5=IF(ISBLANK([Bogus2EasyAccounting2022.xlsx]Expenses!$D5),"",([Bogus2EasyAccounting2022.xlsx]Expenses!$D5))
G4G4=SUM(G3+[@Income]-[@Debits])
G5:G30G5=G4+N([@Income])-N([@Debits])
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
I have continued looking for an answer and have thus far found nothing that helps. I would so much appreciate any suggestions, thanks.
 
Upvote 0
I find it helpful to lay out the formula this way.
Excel Formula:
=IF(E4="",
       IFERROR(
                INDEX(L$3:L$9,MATCH(F4,M$3:M$9,0)),
                I$9),
        "Income")

Is there some way whenever the monthly Mobile expense differs from the norm that the Category indicates “Mobile Phone” in lieu of “Miscellaneous”?
At the moment if it can't find a Match for the amount (F4), it will cause and error and return I$9 which is Miscellaneous, Change it to I$8 if you want Mobile phone.
I assume can't find the amount equates to "differs from the norm"
In addition note the presence of the I$9 portion of the formula: =IF(E4=“”,IFERROR(INDEX(L$3:L$9,MATCH(F4,M$3:M$9,0)),I$9),”Income”) which occurs in all cells D4 thru D30. What is the significance or reason for this part of the formula? It seems redundant for no particular reason. Perhaps there is a better solution to this part of the formula?
See above
Also what part does the ,0 play in the portion: (F4,M$3:M$9,0)?
the 0 tells the Match that is to look for an exact match and not the nearest below or above
 
Upvote 0
I find it helpful to lay out the formula this way.
Excel Formula:
=IF(E4="",
       IFERROR(
                INDEX(L$3:L$9,MATCH(F4,M$3:M$9,0)),
                I$9),
        "Income")


At the moment if it can't find a Match for the amount (F4), it will cause and error and return I$9 which is Miscellaneous, Change it to I$8 if you want Mobile phone.
I assume can't find the amount equates to "differs from the norm"

See above

the 0 tells the Match that is to look for an exact match and not the nearest below or above
I laid out the formula as you indicate and all seems to work okay but I am puzzled as to what the significance is of the I$9 or I$8 or whatever number goes with I$
So I changed the I$8 or 9 to I$3:I$11 and all seems to work okay.
 
Upvote 0
The I8 or I9 is being used to retrieve an item from the table when the match errors out.
In this usage I probably would have hard coded it eg "Mobile Phone"
 
Upvote 0

Forum statistics

Threads
1,214,645
Messages
6,120,711
Members
448,984
Latest member
foxpro

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