Using SUMPRODUCT with a VLOOKUP

M

mae_bear22

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
 
M

Mike H

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
 
E

excel.instructor

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top