A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Lookup



 
 
Thread Tools Display Modes
  #1  
Old August 20th, 2009, 12:42 PM posted to microsoft.public.excel.newusers
Tarig
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  
Old August 20th, 2009, 01:05 PM posted to microsoft.public.excel.newusers
eduardo
external usenet poster
 
Posts: 2,131
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

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:15 PM.


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