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 » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Using SUMPRODUCT with a VLOOKUP



 
 
Thread Tools Display Modes
  #1  
Old September 15th, 2008, 05:42 PM posted to microsoft.public.excel.worksheet.functions
mae_bear22
external usenet poster
 
Posts: 1
Default Using SUMPRODUCT with a VLOOKUP

Hi

I have a spreadsheet that goes as follows. Column A is Salesperson's name
and Column B is Achevied Sales Target (Yes or No). Column A gets it data
from anothr spreadsheet using a VLOOKUP table, hence each value is preceded
with a ' sign. C

I am using SUMPRODUCT to count the number of times a salesperson in A has
hit the target in B. The formula is as follows:

=SUMPRODUCT((I2:I22="YES")*(J2:J22="JOE"))

This only works if I retype "JOE" in the cell as text, deleting the v-lookup
formula. Obviously this is tedious and defeats the purpose of the vlookup.

Is there a way to correct my formula OR use a new formula?

Thanks!

Steph
  #2  
Old September 15th, 2008, 06:02 PM posted to microsoft.public.excel.worksheet.functions
Mike H
external usenet poster
 
Posts: 8,419
Default Using SUMPRODUCT with a VLOOKUP

Hi,

This is confusing.
Why does the data in Col A have a ' in front.
Yor narrative refers to columns A & B and your example formula refers to 2
different columns,

That aside try this
=SUMPRODUCT(--(I2:I22="YES")*--(J2:J22="JOE"))
Mike

"mae_bear22" wrote:

Hi

I have a spreadsheet that goes as follows. Column A is Salesperson's name
and Column B is Achevied Sales Target (Yes or No). Column A gets it data
from anothr spreadsheet using a VLOOKUP table, hence each value is preceded
with a ' sign. C

I am using SUMPRODUCT to count the number of times a salesperson in A has
hit the target in B. The formula is as follows:



This only works if I retype "JOE" in the cell as text, deleting the v-lookup
formula. Obviously this is tedious and defeats the purpose of the vlookup.

Is there a way to correct my formula OR use a new formula?

Thanks!

Steph

  #3  
Old September 15th, 2008, 06:02 PM posted to microsoft.public.excel.worksheet.functions
[email protected]
external usenet poster
 
Posts: 5
Default Using SUMPRODUCT with a VLOOKUP

On Sep 15, 10:42*am, mae_bear22
wrote:
Hi

I have a spreadsheet that goes as follows. *Column A is Salesperson's name
and Column B is Achevied Sales Target (Yes or No). *Column A gets it data
from anothr spreadsheet using a VLOOKUP table, hence each value is preceded
with a ' sign. * C

I am using SUMPRODUCT to count the number of times a salesperson in A has
hit the target in B. *The formula is as follows:

=SUMPRODUCT((I2:I22="YES")*(J2:J22="JOE"))

This only works if I retype "JOE" in the cell as text, deleting the v-lookup
formula. *Obviously this is tedious and defeats the purpose of the vlookup. *

Is there a way to correct my formula OR use a new formula?

Thanks!

Steph


Steph-
Do you know why your Vlookup function is returning the salesperson's
name with the preceding tick (') mark in front of it? Does the source
data contain a tick?
  #4  
Old September 15th, 2008, 06:19 PM posted to microsoft.public.excel.worksheet.functions
mae_bear22[_2_]
external usenet poster
 
Posts: 7
Default Using SUMPRODUCT with a VLOOKUP

IT WORKED!!! No one in my office could figure this one out!!!

Thank you!!!!

"mae_bear22" wrote:

Hi

I have a spreadsheet that goes as follows. Column A is Salesperson's name
and Column B is Achevied Sales Target (Yes or No). Column A gets it data
from anothr spreadsheet using a VLOOKUP table, hence each value is preceded
with a ' sign. C

I am using SUMPRODUCT to count the number of times a salesperson in A has
hit the target in B. The formula is as follows:

=SUMPRODUCT((I2:I22="YES")*(J2:J22="JOE"))

This only works if I retype "JOE" in the cell as text, deleting the v-lookup
formula. Obviously this is tedious and defeats the purpose of the vlookup.

Is there a way to correct my formula OR use a new formula?

Thanks!

Steph

  #5  
Old September 15th, 2008, 06:59 PM posted to microsoft.public.excel.worksheet.functions
Mike H
external usenet poster
 
Posts: 8,419
Default Using SUMPRODUCT with a VLOOKUP

Glad I could help

"mae_bear22" wrote:

IT WORKED!!! No one in my office could figure this one out!!!

Thank you!!!!

"mae_bear22" wrote:

Hi

I have a spreadsheet that goes as follows. Column A is Salesperson's name
and Column B is Achevied Sales Target (Yes or No). Column A gets it data
from anothr spreadsheet using a VLOOKUP table, hence each value is preceded
with a ' sign. C

I am using SUMPRODUCT to count the number of times a salesperson in A has
hit the target in B. The formula is as follows:

=SUMPRODUCT((I2:I22="YES")*(J2:J22="JOE"))

This only works if I retype "JOE" in the cell as text, deleting the v-lookup
formula. Obviously this is tedious and defeats the purpose of the vlookup.

Is there a way to correct my formula OR use a new formula?

Thanks!

Steph

 




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 01:55 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.