IF function

G

Guest

I would like to replicate an "IF" function to encompass several rows of data.
For instance, I have the formula =IF(A1=B1,C1,C1), which I want the cell to
show C1 whenever A1=B1 (Cell A1 is a validation list showing data from
B1:B20). I want the "IF" formula to encompass all the rows of B data
(B1:B20), so that if A is on B2, it should show C2, and if on B3, it should
show C3, and so forth). Is it possible to create a formula within a cell A1
to do that? Many thanks.
 
G

Guest

Assuming C data is from C1:C20

=INDEX($C$1:$C$20,MATCH($A$1,$B$1:$B$20,0))

BUT you can't have formula and value in the same cell i.e the above cannot
be in A1 if understood you correctly.

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top