Create drop down list to show numbers between 2 specified numbers on different sheet

pdong

New Member
Joined
Aug 11, 2020
Messages
3
Office Version
  1. 2010
Platform
  1. Windows
I have 2 specified numbers on Sheet1 and list of numbers on another sheet. I want to create drop down list just to show the numbers between 2 specified numbers on sheet 1
example:
Sheet1:
1597246848744.png


sheet 2 named 'Serialization' like this:
1597246908782.png

I used the formula below and it works on excel, but when I copy to Data validation to create drop down, it doesn't work.

IF(AND(ISERROR(LEFT($A2,1)*1),LEN($A2)=4),LEFT($A2,1)&INDIRECT("'"&$C$2&"'!"&"D"&RIGHT($A2,3)+1&":$D$"&RIGHT($B2,3)+1),IF(LEN($A2)=4,INDIRECT(""&$C$2&"!$A$"&A2+1&":$A$"&B2+1),IF(LEN($A2)=5,INDIRECT(""&$C$2&"!$B$"&$A2+1&":$B$"&$B2+1),IF(LEFT($A2,1)="E","E"&INDIRECT(""&$C$2&"!$B$"&RIGHT($A2,5)+1&":$B$"&RIGHT($B2,5)+1),IF(LEFT($A2,1)="S","S"&INDIRECT(""&$C$2&"!$C$"&RIGHT($A2,7)+1&":$C$"&RIGHT($B2,7)+1),"")))))

I broke down the formula to make the length < 250 but I only works with this formula as shown down here:
IF(LEN($A2)=4,INDIRECT(""&$C$2&"!$A$"&A2+1&":$A$"&B2+1),IF(LEN($A2)=5,INDIRECT(""&$C$2&"!$B$"&$A2+1&":$B$"&$B2+1),"")

The rest of formula doesn't work:
IF(AND(ISERROR(LEFT($A2,1)*1),LEN($A2)=4),LEFT($A2,1)&INDIRECT("'"&$C$2&"'!"&"D"&RIGHT($A2,3)+1&":$D$"&RIGHT($B2,3)+1),"")

IF(LEFT($A2,1)="E","E"&INDIRECT(""&$C$2&"!$B$"&RIGHT($A2,5)+1&":$B$"&RIGHT($B2,5)+1),IF(LEFT($A2,1)="S","S"&INDIRECT(""&$C$2&"!$C$"&RIGHT($A2,7)+1&":$C$"&RIGHT($B2,7)+1),""))

Please help.
thanks
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
I suppose you wont need such a long formula to return number between two Numbers

New Microsoft Excel Worksheet.xlsx
MNOP
7250255250
8251
9252
10253
11254
12255
Sheet2
Cell Formulas
RangeFormula
P7:P12P7=ROW(INDIRECT(M7&":"&N7))
Dynamic array formulas.
Cells with Data Validation
CellAllowCriteria
P7Custom=ROW(INDIRECT(M7&":"&N7))


And Drag it Down

Also once you have the Numbers Just Select the whole range and go to data validation and to create drop down list
 
Upvote 0
Thank you,
but the lists are different format of numbers with multiple conditions per formula and I want to create a drop down list based on input from column A and column B on Sheet1.
Thanks
 
Upvote 0
I encounter error message when I copy the below formula to data validation for drop down list

IF(AND(ISERROR(LEFT($A2,1)*1),LEN($A2)=4),LEFT($A2,1)&INDIRECT("'"&$C$2&"'!"&"D"&RIGHT($A2,3)+1&":$D$"&RIGHT($B2,3)+1),"")

the error said: the list source must be a delimited list, or a reference to single row or column
Please help
 
Upvote 0

Forum statistics

Threads
1,214,911
Messages
6,122,192
Members
449,072
Latest member
DW Draft

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