View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default How to get a value from 1 table to a 2nd.

Hi Paul,

Am Sat, 06 Apr 2013 11:35:27 +0200 schrieb Paul:

First table:
A,B,C are input data
D = summ of value from 2nd table
E= C-D
F= input data

A B C D E F
Code Product Quant Despatched Differ. Max/deliver
1 Sample1 300 150 150 50
2 Sample2 100 50 50 50
3 Sample3 47 7 40 50
4 Sample4 193 93 100 50

a detailed table with

A B C D
Date Code Product Quant
10 25.03 1 sample1 10
20 25.03 2 sample2 50
30 26.03 1 sample1 50
40 27.03 3 sample3 ??
50 27.03 1 sample1 ??


in D10 try:
=MIN(VLOOKUP(B10,$A$2:$F$5,5,0),VLOOKUP(B10,$A$2:$ F$5,6,0))
and in C10 for the code:
=INDEX($A$1:$A$5,MATCH(C10,$B$1:$B$5,0))


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2