#1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 29
Default Lookup

Hi,

I have customer master codes in sheet 1, and customer codes and sales value
in sheet 2. I want to update sheet 1 with sales amounts from sheet 2, my
problem is that lookup is giving customers who do not appear in sheet 2 the
same sales value as the last customer code with sales value which makes me
manually delete amounts in these cells.
Illustration:
Sheet(1)
Customer Code Customer Name
12345 John
12346 James
12347 Joan
12348 Sam

Sheet (2)
Customer Code Sales Value ($)
12345 5,000
12346 1,500
12348 750

Sheet (1) after Lookup
Customer Code Customer Name Sales Value ($)
12345 John 5,000
12346 James 1,500
12347 Joan 1,500
12348 Sam 750
Sales value for 12347 is taken from 12346!

Is there any solution to this?

Thanks
--
tarig
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 2,276
Default Lookup

Hi
I assume in sheet 2 your customer code is in column A starting in row 2 and
the amounts in Column B,then you want the results in sheet 1 in column C
starting row2
so in sheet1 C2 enter

=sumproduct(--(A1=sheet2!$A$1:$A$3000),sheet2!$B$1:$B$3000)

change the range to fit your needs, remember that both sides of the formula
has to be the same range if you ar using excel 2007 enter

=sumproduct(--(A1=sheet2!A:A),sheet2!B:B)

if this helps please click yes, thanks


"Tarig" wrote:

Hi,

I have customer master codes in sheet 1, and customer codes and sales value
in sheet 2. I want to update sheet 1 with sales amounts from sheet 2, my
problem is that lookup is giving customers who do not appear in sheet 2 the
same sales value as the last customer code with sales value which makes me
manually delete amounts in these cells.
Illustration:
Sheet(1)
Customer Code Customer Name
12345 John
12346 James
12347 Joan
12348 Sam

Sheet (2)
Customer Code Sales Value ($)
12345 5,000
12346 1,500
12348 750

Sheet (1) after Lookup
Customer Code Customer Name Sales Value ($)
12345 John 5,000
12346 James 1,500
12347 Joan 1,500
12348 Sam 750
Sales value for 12347 is taken from 12346!

Is there any solution to this?

Thanks
--
tarig

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
LOOKUP FUNCTION? (LOOKUP VALUE BEING A TIME RENERATED FROM A FORMU JCC Excel Discussion (Misc queries) 5 June 26th 09 09:15 PM
Lookup looks to the prior column if zero appears in the lookup col kenbquik Excel Discussion (Misc queries) 2 March 12th 09 03:41 AM
Matrix lookup/mulitple criteria lookup MarkFranklin Excel Discussion (Misc queries) 3 March 31st 08 10:15 AM
Join 2 Lists - Lookup value in 1 list & use result in 2nd lookup JBush Excel Worksheet Functions 3 January 3rd 07 11:14 PM
Pivot table doing a lookup without using the lookup function? NGASGELI Excel Discussion (Misc queries) 0 August 2nd 05 05:08 AM


All times are GMT +1. The time now is 07:15 AM.

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

About Us

"It's about Microsoft Excel"