ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Tri (https://www.excelbanter.com/excel-programming/296883-tri.html)

Christophe Drezet

Tri
 
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

Juan Pablo González

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

Juan Pablo González

"Christophe Drezet" wrote in message
om...
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




Bob Phillips[_6_]

Tri
 
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)

"Christophe Drezet" wrote in message
om...
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




Fun Kid

Tri
 
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.

"Christophe Drezet" wrote in message
om...
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




All times are GMT +1. The time now is 10:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com