aravindhan_31
Well-known Member
- Joined
- Apr 11, 2006
- Messages
- 672
- Office Version
- 365
- 2019
- 2016
- Platform
- Windows
Hi,
I have the data sheet 1 like country in column A, emp name in col B & Salary in Col C
In sheet 2, I have few names, in Col A like John, Peter Jack etc. I have to do a lookup and bring their salary in col B
I use simple lookup = vlookup(A2, Sheet1B:C,2,0) this works without any problem,
the challenge now is, I want to do this by excluding some countries,
eg. in sheet 1, under india & China I have the name John, when I do a lookup it gives me the first result. How do I exclude the countries in my lookup formula itself? if I say exclude india in the formula, then vlookup up result will be from china even though John name is there in India. if I exclude both china & India in my formula then no result should come.
Can someone help me with the formula or macro for this?
Regards
Arvind
I have the data sheet 1 like country in column A, emp name in col B & Salary in Col C
In sheet 2, I have few names, in Col A like John, Peter Jack etc. I have to do a lookup and bring their salary in col B
I use simple lookup = vlookup(A2, Sheet1B:C,2,0) this works without any problem,
the challenge now is, I want to do this by excluding some countries,
eg. in sheet 1, under india & China I have the name John, when I do a lookup it gives me the first result. How do I exclude the countries in my lookup formula itself? if I say exclude india in the formula, then vlookup up result will be from china even though John name is there in India. if I exclude both china & India in my formula then no result should come.
Can someone help me with the formula or macro for this?
Regards
Arvind