can't find a formula that works for multiple conditions

hello

i can't find a way to put to work the following statement

if C2 value is in H2:H1000 put value of H1 in D2; if C2 value is in I2:I1000 put value of I1 in D2; if C2 value is in J2:J1000 put value of J1 in D2

Excel has any way to make such condition in a single cell?

Thx in advance

BR
Rui
rsilva49Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
Maybe this......

=IF(ISNUMBER(MATCH(C2,$H$2:$H$1000,0)),H1,IF(ISNUMBER(MATCH(C2,$I$2:$I$1000,0)),I1,IF(ISNUMBER(MATCH(C2,$J$2:$J$1000,0)),J1,"")))

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
akbCommented:
Put this in D2:
=+IF(ISERROR(MATCH(C2,H2:H1000,0))=FALSE,H1,IF(ISERROR(MATCH(C2,I2:I1000,0))=FALSE,I1,IF(ISERROR(MATCH(C2,J2:J1000,0))=FALSE,J1,"No Match Found")))
Hakan YılmazProject EngineerCommented:
If you explain your problem more detailed, you may get more general / higher quality answers.
This is for cell D2
=IF(COUNTIF(OFFSET($H$1;1;0;1000;1);$C$2);$H$1;IF(COUNTIF(OFFSET($I$1;1;0;1000;1);$C$2);$I$1;IF(COUNTIF(OFFSET($J$1;1;0;1000;1);$C$2);$J$1;0)))

Open in new window

Or, half evaluated version
=IF(COUNTIF($H$2:$H$1000;$C$2);$H$1;IF(COUNTIF($I$2:$I$1000;$C$2);$I$1;IF(COUNTIF($J$2:$J$1000;$C$2);$J$1;0)))

Open in new window

Hakan YılmazProject EngineerCommented:
This is an another trial for D2.
This will first find in which column your data is. But it needs the value you search to be unique.
This formula can easily be extended for more columns.
=INDEX($H$1:$J$1;SUM(MMULT(--($H$2:$J$1000=$C$2);ROW(INDIRECT("1:"&COLUMNS($H$1:$J$1))))))

Open in new window

Martin LissOlder than dirtCommented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.