View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
smartin smartin is offline
external usenet poster
 
Posts: 915
Default Populate a cell if values in cell 1 and cell 2 match cell 3 and4

wrote:
I need help with a formula please. I need to search through a column
of data and populate a cell if it meets a condition. For example:

IF FirstWorksheet!A2 = SecondWorksheet!ColumnAx and
FirstWorksheet!B2 = SecondWorksheet!ColumnBx
Then populate SecondWorksheet!Cx with value from FirstWorksheet!C2


I have to match up a column of data in one worksheet with data in 2
columns in another worksheet.


There are a few ways to accomplish this. Google "excel multiple [column
| key] lookup" for other examples.

But first, did you mean this, because the other way around would be
atypical...
populate FirstWorksheet!C2 with value from FirstWorksheet!C2
^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^

I will assume the answer is "yes".

If FirstWorksheet A:B are unique, then FirstWorksheet!C2 is given as

=Sumproduct(--(A2=SecondWorksheet!$A$1:Ax),--(B2=SecondWorksheet!$B$1:$Bx),(SecondWorksheet!$C$ 1:$Cx))

Replace "x" with appropriate row number. Note you can not use total
column references like "A:A" here.