Dynamic List & Named Ranges

DipDip

Board Regular
Joined
Jan 23, 2015
Messages
76
Office Version
  1. 2016
Platform
  1. Windows
Hi all,
Just wondering if someone can help me with something. I have the following data:
Name
f
a
t
c
t
d
a
e
f

<tbody>
</tbody>
What I want is for a list to be populated elsewhere in the worksheet which gives me only unique values.

I have used the following formula:

Code:
{=INDEX(List,MATCH(SMALL(IF(COUNTIF($E$1:E1,List)=0,COUNTIF(List,"<"&List),""),1),COUNTIF(List,"<"&List),0))}

BUT the range I have for the named data List is as follows:
Code:
=OFFSET(Data!$A$2, 0, 0, COUNTA(Data!$A:$A)-1,1)

Because I need the list to be dynamic for a Userform combobox I have created that uses this list and also as more data is added to Column A, I don't want to be having to alter the code all the time.

These two combinations don't work, all it does is give me the first value.

Can anyone please help me?

Thanks in advance peeps!
 
Last edited:

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
In which cell are you entering the first formula?
Putting it on E2 and copying it down everything worked perfectly - see below


A
B
C
D
E
1
Name​
Unique List​
2
f​
a​
3
a​
c​
4
t​
d​
5
c​
e​
6
t​
f​
7
d​
t​
8
a​
9
e​
10
f​
11

Note that I wrapped the formula with the IFERROR (...) function to avoid errors.

Array formula in E2 copied down
=IFERROR(INDEX(List,MATCH(SMALL(IF(COUNTIF($E$1:E1,List)=0,COUNTIF(List,"<"&List),""),1),COUNTIF(List,"<"&List),0)),"")
confirmed with Ctrl+Shift+Enter, not just Enter

M.
 
Upvote 0
Did you use the following for the list? As i have just tried what you suggested and it just displays "a" in every cell. Which is the problem I was getting. I was pressing ctrl+shift+enter, to set as an array.

Code:
=OFFSET(Data!$A$2, 0, 0, COUNTA(Data!$A:$A)-1,1)
 
Last edited:
Upvote 0
Yes, i used the dynamic named range and everything worked perfectly.

You didn't answer my question.
In which cell(s) are you entering the formula(s)?

M.
 
Upvote 0
Sorry, I am entering it in E2 as you have. This is annoying then. Not sure why it won't work.
 
Upvote 0
Ah, it seems that you have more data below the last entry or blank cells in the middle of your data.
Is it the case?

M.
 
Upvote 0
Ah, it seems that you have more data below the last entry or blank cells in the middle of your data.
Is it the case?

M.

There is nothing entered below A10. I must be missing something somewhere. Just not sure where. Let me quickly try on a new sheet as opposed to the one I have been working on... BRB
 
Upvote 0
Okay so it now works, so must be something to do with my old workbook. Cheers for the help!!! Greatly Appreciated!
 
Upvote 0

Forum statistics

Threads
1,214,376
Messages
6,119,179
Members
448,871
Latest member
hengshankouniuniu

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