#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default 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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:52 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"