ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Match values (https://www.excelbanter.com/excel-worksheet-functions/133866-match-values.html)

plunk25

Match values
 
I have 2 worksheets that are setup as follows:

wksht1:
column a = customer number
column b = customer name
column c = sales ytd

wksht2:
column a = customer number


What I need to do is pull the sales ytd from wksht1 and place it in wksheet
2 only if the customer number from wksht2 has a match in column a in wksht1.

I've tried a vlookup, but it doesn't quite do what I need it to. Can anyone
point me in the right direction?

Martin Fishlock

Match values
 
hi plunk:

the vlookup returns n/a on no match right?

so you can do the following:

=if(isna(vlookup(a2, wksht1!a:c, 3 false)),"",vlookup(a2, wksht1!a:c, 3
false))

or sum the sumif formula

=sumif(wksht1!a:a, a2,wksht1!c:c)

assuming the item is on row 2
--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.


"plunk25" wrote:

I have 2 worksheets that are setup as follows:

wksht1:
column a = customer number
column b = customer name
column c = sales ytd

wksht2:
column a = customer number


What I need to do is pull the sales ytd from wksht1 and place it in wksheet
2 only if the customer number from wksht2 has a match in column a in wksht1.

I've tried a vlookup, but it doesn't quite do what I need it to. Can anyone
point me in the right direction?



All times are GMT +1. The time now is 06:21 AM.

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