Forum Discussion
siddharthbeam
May 10, 2019Copper Contributor
Can we use VLookup to fill in fields from Scattered Data ?
Hi, I wanted to know that is it possible to use VLookup to fill in data in a certain row by matching it from different rows rather than just from a single row. In the attached image, I want to ...
Detlef_Lewin
May 11, 2019Silver Contributor
There are several ways to solve this.
Two examples:
=SUMPRODUCT(--($A$2:$D$12=G2),$B$2:$E$12)
=IFERROR(VLOOKUP(G2,$A$2:$B$12,2,FALSE),VLOOKUP(G2,$D$2:$E$12,2,FALSE))
But the best option is to restructure the data so that you can use just one VLOOKUP().
- siddharthbeamMay 13, 2019Copper Contributor
I tried both methods but none of them is able to pull the values of Pink & Yellow. In the first method, the value is always coming to be "2500" and in the second method it's only filling in "TRUE" and no the value.
P.S. - I'm attaching the file where the problem is. Please have a look at it and tell me if you have a way to solve it.
Thank You in advance.
- Detlef_LewinMay 13, 2019Silver Contributor
I don't know why do still use the wrong VLOOKUP() and get a mixture of two formulas in one column.
There has to be only one formula in the column. Put in H2 and copy it down.
- siddharthbeamMay 16, 2019Copper Contributor