Data Validation List with OFFSET wont accept text

DSCfromCFA

Board Regular
Joined
Feb 27, 2018
Messages
151
Office Version
  1. 365
Platform
  1. Windows
I am using the following formula to alter the length of a Data Validation List:
=OFFSET($N$15,1,0,OFFSET($N$15,M16,0))
The formula only works if the cell in the list that corresponds with the number held in M16 is itself a number. However, the purpose of the list is to select text. All other cells can contain text, and as long as the cell that corresponds with M16 is a number, the validation works, otherwise no selection is possible and even trying to accept the Validation formula results in an message "The Source currently evaluates to an error. Do you want to continue?"


The list is a maximum of 6 rows starting at N16 and the number of rows to make the list is held in M16.

Excel version Microsoft 365 MSO (Version 2412 Build 16.0.18324.20092) 64-bit

What am I missing?
Shane
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Hi DSCfromCFA,

Based on a test I've done with 1 to 6 in N16, your formula seems to work. As soon as a changed one value, the offset formula returned a bunch of 0. If you could provide a sample of your real data, it would help to provide the right answer.

Here's I would change the formula: *I am using the French version of Excel 365, so there might be some errors due to manual translation or discrepancies in the Excel user manual*

Excel Formula:
=CHOOSEROWS(N16:N21,SEQUENCE(M16))

Classeur1 (version 1).xlsb
MNOP
15Number of valuelistNewFormulaOffsetFormula
165110
17330
18550
19770
20990
21110
220
230
240
Feuil1
Cell Formulas
RangeFormula
O16:O20O16=CHOOSEROWS(N16:N21,SEQUENCE(M16))
P16:P24P16=OFFSET(M16,1,0,OFFSET($N$15,M16,0))
Dynamic array formulas.


Bests regards,

Vincent
 
Upvote 0
Thank you both for the responses, and without trying them all, the first option suggested by Stephen worked a treat.

Regards

shane
(So much to learn - so little time)
 
Upvote 0

Forum statistics

Threads
1,225,635
Messages
6,186,128
Members
453,340
Latest member
Stu61

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