How to exceed character limit for Data Validation List

ValiantGames

New Member
Joined
May 20, 2022
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hi all! I am running multiple offset functions with nested ifs to return a drop down list dependant on 3 variables (A,B,C). Is there a way I can avoid the character limit for data validation? I don't know how I can simplify this formula.

Variabe A = Ability Level (0,1,2,3) (Purple) B3
Variable B= Range (High, Medium, Low) (White) B19
Variable C = AOE (High, Medium Low) (light Blue) B18


=IF(B18="High",OFFSET((IF(B3=0,$AB$119,IF(B3=1,$S$119,IF(B3=2,$J$119,IF(B3=3,$A$119))))),1,MATCH($B$19,$A$119:$C$119,0)-1,COUNTA(OFFSET((IF(B3=0,$AB$119,IF(B3=1,$S$119,IF(B3=2,$J$119,IF(B3=3,$A$119))))),1,MATCH($B$19,$A$119:$C$119,0)-1,100,1))),

IF(B18="Medium",OFFSET((IF(B3=0,$AE$119,IF(B3=1,$V$119,IF(B3=2,$M$119,IF(B3=3,$D$119))))),1,MATCH($B$19,$A$119:$C$119,0)-1,COUNTA(OFFSET((IF(B3=0,$AE$119,IF(B3=1,$V$119,IF(B3=2,$M$119,IF(B3=3,$D$119))))),1,MATCH($B$19,$A$119:$C$119,0)-1,100,1))),

IF(B18="Low",OFFSET((IF(B3=0,$AH$119,IF(B3=1,$Y$119,IF(B3=2,$P$119,IF(B3=3,$G$119))))),1,MATCH($B$19,$A$119:$C$119,0)-1,COUNTA(OFFSET((IF(B3=0,$AH$119,IF(B3=1,$Y$119,IF(B3=2,$P$119,IF(B3=3,$G$119))))),1,MATCH($B$19,$A$119:$C$119,0)-1,100,1))),0)))
 

Attachments

  • Datavalidationpng.png
    Datavalidationpng.png
    219.6 KB · Views: 15

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Is there a way I can avoid the character limit for data validation?
If I have understood correctly and the COUNTA part is counting how many values appear in the relevant column from row 120 down, then I would suggest this.

Add these formulas across row 116 so that the counts are readily available (I just have dummy data from row 120 down)

ValiantGames.xlsm
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJ
116457234744777776475777777777345677437
117Ability level 3Ability level 2Ability level 1Ability level 0
118HighMediumLowHighMediumLowHighMediumLowHighMediumLow
119LowMediumHighLowMediumHighLowMediumHighLowMediumHighLowMediumHighLowMediumHighLowMediumHighLowMediumHighLowMediumHighLowMediumHighLowMediumHighLowMediumHigh
120A120B120C120D120E120F120G120H120I120J120K120L120M120N120O120P120Q120R120S120T120U120V120W120X120Y120Z120AA120AB120AC120AD120AE120AF120AG120AH120AI120AJ120
121A121B121C121D121E121F121G121H121I121J121K121L121M121N121O121P121Q219R121S121T121U121V121W121X121Y121Z121AA121AB121AC121AD121AE121AF121AG121AH121AI121AJ121
122A122B122C122E122F122G122H122I122J122K122L122M122N122O122P122Q319R122S122T122U122V122W122X122Y122Z122AA122AB122AC122AD122AE122AF122AG122AH122AI122AJ122
123A123B123C123F123G123H123I123J123K123L123M123N123O123P123Q419R123S123T123U123V123W123X123Y123Z123AA123AC123AD123AE123AF123AG123AH123AJ123
124B124C124G124J124K124L124M124N124O124Q120R124S124T124U124V124W124X124Y124Z124AA124AD124AE124AF124AG124AJ124
125C125G125J125K125L125M125N125O125Q220S125T125U125V125W125X125Y125Z125AA125AE125AF125AG125AJ125
126C126G126J126K126L126M126N126Q320S126T126U126V126W126X126Y126Z126AA126AF126AG126AJ126
Sheet1
Cell Formulas
RangeFormula
A116:AJ116A116=COUNTA(A120:A220)


Then use this as your Data Validation formula.

Excel Formula:
=OFFSET($A$120,0,(3-$B$3)*9+(3-MATCH($B$19,$A$119:$C$119,0))*3+MATCH($B$18,$A$119:$C$119,0)-1,OFFSET($A$120,-4,(3-$B$3)*9+(3-MATCH($B$19,$A$119:$C$119,0))*3+MATCH($B$18,$A$119:$C$119,0)-1),1)
 
Upvote 0
If the calculations in that previous method are a bit complex, here is another approach that could be taken and may be more intuitive?

These formulas copied across rows 115 and 166 (may have to adjust this location or else what is already in row 115)

ValiantGames.xlsm
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJ
1153HL3HM3HH3ML3MM3MH3LL3LM3LH2HL2HM2HH2ML2MM2MH2LL2LM2LH1HL1HM1HH1ML1MM1MH1LL1LM1LH0HL0HM0HH0ML0MM0MH0LL0LM0LH
116A120:A123B120:B124C120:C126D120:D121E120:E122F120:F123G120:G126H120:H123I120:I123J120:J126K120:K126L120:L126M120:M126N120:N126O120:O125P120:P123Q120:Q126R120:R124S120:S126T120:T126U120:U126V120:V126W120:W126X120:X126Y120:Y126Z120:Z126AA120:AA126AB120:AB122AC120:AC123AD120:AD124AE120:AE125AF120:AF126AG120:AG126AH120:AH123AI120:AI122AJ120:AJ126
117Ability level 3Ability level 2Ability level 1Ability level 0
118HighMediumLowHighMediumLowHighMediumLowHighMediumLow
119LowMediumHighLowMediumHighLowMediumHighLowMediumHighLowMediumHighLowMediumHighLowMediumHighLowMediumHighLowMediumHighLowMediumHighLowMediumHighLowMediumHigh
120A120B120C120D120E120F120G120H120I120J120K120L120M120N120O120P120Q120R120S120T120U120V120W120X120Y120Z120AA120AB120AC120AD120AE120AF120AG120AH120AI120AJ120
121A121B121C121D121E121F121G121H121I121J121K121L121M121N121O121P121Q219R121S121T121U121V121W121X121Y121Z121AA121AB121AC121AD121AE121AF121AG121AH121AI121AJ121
122A122B122C122E122F122G122H122I122J122K122L122M122N122O122P122Q319R122S122T122U122V122W122X122Y122Z122AA122AB122AC122AD122AE122AF122AG122AH122AI122AJ122
123A123B123C123F123G123H123I123J123K123L123M123N123O123P123Q419R123S123T123U123V123W123X123Y123Z123AA123AC123AD123AE123AF123AG123AH123AJ123
124B124C124G124J124K124L124M124N124O124Q120R124S124T124U124V124W124X124Y124Z124AA124AD124AE124AF124AG124AJ124
125C125G125J125K125L125M125N125O125Q220S125T125U125V125W125X125Y125Z125AA125AE125AF125AG125AJ125
126C126G126J126K126L126M126N126Q320S126T126U126V126W126X126Y126Z126AA126AF126AG126AJ126
Sheet1 (2)
Cell Formulas
RangeFormula
A115:AJ115A115=RIGHT(LOOKUP("zzz",$A117:A117),1)&LEFT(LOOKUP("zzz",$A118:A118),1)&LEFT(A119,1)
A116:AJ116A116=ADDRESS(ROW(A120),COLUMN(),4)&":"&ADDRESS(ROW(A120)+COUNTA(A120:A220)-1,COLUMN(),4)


Then use this as your Data Validation formula.

Excel Formula:
=INDIRECT(XLOOKUP($B$3&LEFT($B$19,1)&LEFT($B$18,1),$A$115:$AJ$115,$A$116:$AJ$116))
 
Upvote 0
Solution
If I have understood correctly and the COUNTA part is counting how many values appear in the relevant column from row 120 down, then I would suggest this.

Add these formulas across row 116 so that the counts are readily available (I just have dummy data from row 120 down)

ValiantGames.xlsm
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJ
116457234744777776475777777777345677437
117Ability level 3Ability level 2Ability level 1Ability level 0
118HighMediumLowHighMediumLowHighMediumLowHighMediumLow
119LowMediumHighLowMediumHighLowMediumHighLowMediumHighLowMediumHighLowMediumHighLowMediumHighLowMediumHighLowMediumHighLowMediumHighLowMediumHighLowMediumHigh
120A120B120C120D120E120F120G120H120I120J120K120L120M120N120O120P120Q120R120S120T120U120V120W120X120Y120Z120AA120AB120AC120AD120AE120AF120AG120AH120AI120AJ120
121A121B121C121D121E121F121G121H121I121J121K121L121M121N121O121P121Q219R121S121T121U121V121W121X121Y121Z121AA121AB121AC121AD121AE121AF121AG121AH121AI121AJ121
122A122B122C122E122F122G122H122I122J122K122L122M122N122O122P122Q319R122S122T122U122V122W122X122Y122Z122AA122AB122AC122AD122AE122AF122AG122AH122AI122AJ122
123A123B123C123F123G123H123I123J123K123L123M123N123O123P123Q419R123S123T123U123V123W123X123Y123Z123AA123AC123AD123AE123AF123AG123AH123AJ123
124B124C124G124J124K124L124M124N124O124Q120R124S124T124U124V124W124X124Y124Z124AA124AD124AE124AF124AG124AJ124
125C125G125J125K125L125M125N125O125Q220S125T125U125V125W125X125Y125Z125AA125AE125AF125AG125AJ125
126C126G126J126K126L126M126N126Q320S126T126U126V126W126X126Y126Z126AA126AF126AG126AJ126
Sheet1
Cell Formulas
RangeFormula
A116:AJ116A116=COUNTA(A120:A220)


Then use this as your Data Validation formula.

Excel Formula:
=OFFSET($A$120,0,(3-$B$3)*9+(3-MATCH($B$19,$A$119:$C$119,0))*3+MATCH($B$18,$A$119:$C$119,0)-1,OFFSET($A$120,-4,(3-$B$3)*9+(3-MATCH($B$19,$A$119:$C$119,0))*3+MATCH($B$18,$A$119:$C$119,0)-1),1)
Bro that is tight!! thank you! I need to study the match function more
 
Upvote 0
You're welcome. Thanks for the follow-up. :)

You have quoted post 2 & apparently commented on that but marked post 3 so, as a matter of interest, I was wondering which one you ended up using?
 
Upvote 0

Forum statistics

Threads
1,224,752
Messages
6,180,742
Members
452,996
Latest member
nelsonsix66

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