Dynamic Dropdown List Error

L

Legacy 464248

Guest
Hi All,

First time poster, long time reader. I have been having an issue with a formula I am inputting into the data validation widget to create a dynamic dependant dropdown error. The formula is as follows:

=OFFSET(Setup[[#Headers],[Savings]],1,MATCH([@[Expense Category]],Setup[[#Headers],[Savings]:[Miscellaneous]],0)-1,COUNTA(OFFSET(Setup[[#Headers],[Savings]],1,MATCH([@[Expense Category]],Setup[[#Headers],[Savings]:[Miscellaneous]],0)-1,20,1)),1)

When the formula is put into the "Data Validation" widget, it returns the "There's a problem with this formula" error.

Normally this would make sense and indicate that there was an error with the formula, but when I put the formula directly into the cell to test it, I can see the results. Although, admittedly, the results return a "#VALUE!". However, when i select the formula in the cell and press F9, it returns the desired result.

I have attached screenshots for peoples reference, but to provide some clarify, the formula in question appears on the tab named "Expense Input" but references a table on the tab named "Setup". I have TRIED to paste the XL2BB code below, but I have not used it before, so I am unsure if it is not correct or enough information.

Any ideas or help would be greatly appreciated.

Expense Input Tab:

Household_Budget_Upload.xlsx
BCDEFGH
19Expense CategoryExpense Sub CategoryMerchantExpense DescriptionDate Of ExpenditureExpense AmountTax Deduction?
20Savings#VALUE!
21Loans & Debts#VALUE!
Expense Input
Cell Formulas
RangeFormula
C20:C21C20=OFFSET(Setup[[#Headers],[Savings]],1,MATCH([@[Expense Category]],Setup[[#Headers],[Savings]:[Miscellaneous]],0)-1,COUNTA(OFFSET(Setup[[#Headers],[Savings]],1,MATCH([@[Expense Category]],Setup[[#Headers],[Savings]:[Miscellaneous]],0)-1,20,1)),1)
Cells with Data Validation
CellAllowCriteria
B20:B21List=Expense_Category


Setup Tab:

Household_Budget_Upload.xlsx
CDEFGHIJKLMNOPQ
3IncomeSavingsLoans & DebtsHome ExpensesWork Expenses Person 2Work Expenses Person 1Education & LessonsTransportationHealthCharity & GiftsDaily LivingEntertainmentSubscriptionsFees & PenaltiesMiscellaneous
4Net Salary - Person 1House DepositCredit CardRentCourses - Person 2Courses - Person 1Swimming Lessons - BabyFuel - Car 1Health InsuranceBirthday Gifts GivenGroceries (Food Only)Wine InvestmentNewspaperBank FeesPostage
5Net Salary - Person 2Car ReplacementHECS - Person 2InternetBooks - Person 2Books - Person 1OtherFuel - Car 2DoctorChristmas Gifts GivenToiletriesSports & RecreationMagazinesTraffic InfringementsMiscellaneous Spending
6PAYG Tax Adjustment - Person 1Retirement FundHome MortgageMobile - Person 2Professional Memberships - Person 2Professional Memberships - Person 1Car Insurance - Car 1DentistMisc Gifts GivenHousehold ConsumablesAlcohol Dues/MembershipsLate Utility FeesOther
7PAYG Tax Adjustment - Person 2InvestmentsOtherMobile - Person 1Indemnity Insurance - Person 2Licensing - Person 1Car Insurance - Car 2Misc ServicesCharitable DonationsPersonal SuppliesGamesStreaming ServicesOther
8GST Credit - Person 2Education FundHome MaintenanceWork Tools - Person 2Work Tools - Person 1Registration - Car 1Medicine/DrugsOtherClothing - Person 1Dining / Eating OutStorage / Backup Services
9Interest IncomePersonal - Person 1Misc ToolsAlterations / Laundry - Person 2Alterations / Laundry - Person 1Registration - Car 2Gym MembershipClothing - Person 2Dinner PartiesOther
10Refunds / ReimbursementsPersonal - Person 2FurniturePPE - Person 2Uniform - Person 1Licensing - Person 1Life InsuranceClothing - BabyHobbies
11Gifts ReceivedOtherAppliancesOtherOtherLicensing - VivaneOtherToiletries / Amenities - BabyMedia
12OtherOtherGeneral MaintenanceCleaning SuppliesToys/Gadgets
13RepairsProfessional ServicesVacation/Travel
14Misc AccessoriesDaily Dining / Eating OutOther
15Uber / Taxi / Ride SharePersonal Grooming - Person 1
16OtherPersonal Grooming - Person 2
17Other
18
19
20
21
Setup
 

Attachments

  • F9 Results.JPG
    F9 Results.JPG
    117.3 KB · Views: 11
  • Formula and Result.JPG
    Formula and Result.JPG
    161.8 KB · Views: 13

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Hi & welcome to MrExcel.
How about
=OFFSET(Setup!$D$3,1,MATCH(B20,Setup!$D$3:$Q$3,0)-1,COUNTA(OFFSET(Setup!$D$3,1,MATCH(B20,Setup!$D$3:$Q$3,0)-1,20,1)),1)
 
Upvote 0
Hi & welcome to MrExcel.
How about
=OFFSET(Setup!$D$3,1,MATCH(B20,Setup!$D$3:$Q$3,0)-1,COUNTA(OFFSET(Setup!$D$3,1,MATCH(B20,Setup!$D$3:$Q$3,0)-1,20,1)),1)
Hi Fluff,

Thanks for the quick reply! That formula works well for what I need it for. I had originally thought referencing named ranges in the table would be more concise, but I don't know if that is possible?

It seems that I can only make it work with absolute cell references. Is that correct?
 
Upvote 0
You cannot use table references in Data validation, although you can use named ranges.
 
Upvote 0
You're welcome & thanks for the feedback.

For future reference, while we do allow Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules). This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.

Cross posted Dynamic Dependant Dropdown Error
 
Upvote 0
Thanks Fluff,

Noted and I will make sure I include that in future. Thanks again.
 
Upvote 0

Forum statistics

Threads
1,215,048
Messages
6,122,862
Members
449,097
Latest member
dbomb1414

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