Forum Discussion
Eirik Arntsen
Jun 08, 2018Copper Contributor
Autofill cells based on one value of another cell
Hi, Need some help to make my life a little bit easier: I'm making plans for a production facility, and I want to autofill all the cells based on product number. I have all the data I need in...
SergeiBaklan
Jun 08, 2018Diamond Contributor
That could be like this
=VLOOKUP($B$1,$A$7:$D$9,ROW())
Eirik Arntsen
Jun 08, 2018Copper Contributor
I'll try, thank you Sergei! :)
- SergeiBaklanJun 08, 2018Diamond Contributor
Eirik,
Better to transform your range with products data into the Table (stay on any cell inside and Ctrl+T), in this case you don't need to adjust your range size in formula.
If your titles in column A are the same as table columns headers you may use
MATCH(A2,Products[#Headers],0)
instead of ROW()-1 (or sequentially numbers 2,3,4 which are numbers of columns in the table). In attached example I renamed the table on Products (Table tools->Design->most left in ribbon), final formula is
=VLOOKUP($B$1,Products[#All],MATCH(A2,Products[#Headers],0))