help with IF and VLOOKUP combined

N

Natalie

I want to do the following:

I have data which says

Postcode Equipment 1 Equipment 2
SE David Bob
B Bill James

and I have sales

Invoice Value Postcode Equipment type
1 £10 SE 1
2 £20 SE 2

and I want a formula to return the name of the sales rep depending on
equipment type.

I have entered

=IF(U2,"Acute
Care",(VLOOKUP(V2,Salespersons!A:C,2,FALSE)),VLOOKUP(V2,Salespersons!A:C,3,FALSE))

U2 = Equipment type
V2 = Postcode

This is wrong so can anyone help please?
 
L

Luke M

As you don't list column references, this is somewhat of a guss, but your
structure will be:

=INDEX(Salespersons!A:C,MATCH(V2,Salespersons!A:A,0),W2+1)

This assumes that V2 lists Postcode, and W2 is your Equipment Type (entered
as a number), and your Salespersons data is in columns A:C, with Postcode
being in column A.

You didn't say anything about U2 or "Acute Care", but throwing that part of
your formula in:

=IF(U2,"Acute Care",INDEX(Salespersons!A:C,MATCH(V2,Salespersons!A:A,0),W2+1))
 
L

Luke M

I see now at bottom of post where your cell references are. Adjusting formula:

=INDEX(Salespersons!A:C,MATCH(V2,Salespersons!A:A,0),U2+1)
 

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