Tri

  • Thread starter Thread starter Christophe Drezet
  • Start date Start date
C

Christophe Drezet

Hello,

I've got a big problem... and -of course- i don't have the solution.

Let me explain:
Imagine a table with a column named Ref -with my reference- and
another column named Amount -with my amounts-

Ref Amount
1
2
3
4
5
6

An another table with datas only for some references:
Ref Amount
4 100
6 150

In conclusion I would like to obtain this table:

Ref Amount
1
2
3
4 100
5
6 150

Who has got a solution??? please

Thanks and have a nice we.

CD
 
Take a look at the VLOOKUP worksheet function, it does just what you need.

Juan Pablo González
 
Assuming table 1 is in A1:B100, Table 2 in H1:I50

in B1 add this formula

=IF(ISNA(VLOOKUP(A1,H1:I50,2,FALSE)),"",VLOOKUP(A1,H1:I50,2,FALSE))

and copy down

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Hi there,

I don't know if I understand your problem correctly but here is what I
came up with.

I assumed that you wanted to do it with Excel and not VBA.

Add this formulae in the amount column of the first table
=IF(AND(A5=D5,E5<>""),E5,"").

The formulae first checks if the references in the two table are the
same and then checks whether the amount cell in the second cell contains
something. If both the instances are true, it enters the value of the
amount cell in the second table to the one in the first table. The
amount in the first cell is empty if either or both of the conditions
are false.

A5 and D5 stands for the Ref column in both tables and E5 stands for the
amount column in the second table.

Hope this is what you were looking for.

Have a good weekend.
 

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

Back
Top