Hi, Can someone please help me? I am trying to figure out the best way to do this. I have a dropdown (picklist) in one cell and based on what is picked I'd like for Excel to autofil another cell

A B1 Picklist Prefill2 Red Sneakers

For exampe when I pick Red from the picklist in A2, B2 will autofill as Sneakers.Thank you!!!!!!

message edited by HarrisLyfe2016

We could use some more information. For a short list a simple IF function would work:

=IF(A2="Red","Sneakers",IF(A2="Blue","Shirts","Something Else"))

You

couldmake that function about as long as you like, but after a while it's gets a bit cumbersome.A better option for a long list would be to use VLOOKUP:

=VLOOKUP(A2,$C$2:$D$100,2,0)

where C2:C100 contains all of the items in your drop down list and D2:D100 contains the associated return value.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

Awesome! I didnt even think of a VLOOKUP! It worked and worked well. I did run into the #N/A error for my blanks but added IFERROR (as below) and I am all-set, thanks! =IFERROR(VLOOKUP(value,table,2,FALSE),"")

You rock!

I did not include the IFERROR based on the assumption that your lookup_table would contain every choice in your drop down. In fact, I assumed that your drop down would use the values in the first column of the lookup_table as the sourcefor the drop down. It's hard to mess up a one-to-one match. ;-)Why have blanks in the drop down?

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

message edited by DerbyDad03

I needed the IFERROR because I copied and pasted the formula from row 1 through row 1500 the data input will be done by someone else. After the copy/paste I noticed the #N/A. I didnt share that in my initial post because I tend to give wayyyyyy to much info and I know your time is valuable so I try to keep my post nice and short. Thanks again!

Ask Your Question

Weekly Poll