# Searching against multiple fields in a single row, populate new field in same row

1. ## Searching against multiple fields in a single row, populate new field in same row

This is part 2 of my question about searching, matching for a particular value, and then populating a cell based on certain conditions. . . .

In this scenario, Column A will always be either a 1 or a 2.
Column B is an originating value
Column C is a terminating value

If A2 equals "1", populate D2 with B2, but if A2 equals "2", then populate D2 with C2
If A3 equals "1", populate D3 with B3, but if A3 equals "2", then populate D3 with C3
If A4 equals "1", populate D4 with B4, but if A4 equals "2", then populate D4 with C4

This problem exists in the same spreadsheet as my previous post. I'd like to run a formula on the spreadsheet to solve the first part, delete the rows with a value of False, and then run THIS formula against the remaining rows of data.  Register To Reply

2. ## Re: Searching against multiple fields in a single row, populate new field in same row

Try

=IF(A2=1,B2,C2)  Register To Reply