# Solved Autofill cell based on data entered into another cell

August 17, 2016 at 15:23:54
Specs: Windows 64
 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 B ``1 Picklist Prefill ``2 Red Sneakers `For exampe when I pick Red from the picklist in A2, B2 will autofill as Sneakers. Thank you!!!!!!message edited by HarrisLyfe2016

See More: Autofill cell based on data entered into another cell

#1
August 17, 2016 at 16:24:04
 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 could make 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.

Report •

#2
August 18, 2016 at 07:15:27
 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!

Report •

#3
August 18, 2016 at 08:55:05
 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 source for the drop down. It's hard to mess up a one-to-one match. ;-)Why have blanks in the drop down?message edited by DerbyDad03

Report •

Related Solutions

#4
August 18, 2016 at 14:34:58
 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!

Report •