Forum Discussion

elopezpcg's avatar
elopezpcg
Copper Contributor
Oct 12, 2021
Solved

Populating an array from a list

The names on the far left are meant to be fixed in the first column. The second column has a drop down list of states, and I want an array to populate based off the selected state. The idea is that the data that populates in the second column when selecting the state will match up with the names on the first column. Please see photos for reference.

 

 

 

I created the list of states using a named range, and the array data is populating from a table in a different tab. 

This is the formula I currently have in place but it only works for Alabama, however I need it to be able to populate the corresponding array for the state selected from the list. 

=IF(B3=Data!B3, Alabama, "Empty")

 

I am using the latest version of Excel on a Windows 10 desktop. 

 

  • elopezpcg 

    Perhaps something like

     

    =INDIRECT(SUBSTITUTE(B3," ","_"))

     

    The defined names for multi-word states such as New Mexico should contain an underscore _ instead of a space.

2 Replies

  • elopezpcg 

    Perhaps something like

     

    =INDIRECT(SUBSTITUTE(B3," ","_"))

     

    The defined names for multi-word states such as New Mexico should contain an underscore _ instead of a space.

    • elpcg's avatar
      elpcg
      Copper Contributor
      Thank you!!! This does exactly what I need it to do! Idk why it wont let me log back in to the username I used but I am elopezpcg and can confirm this worked for me.

Resources