×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

I have three columns in excel named

I have three columns in excel named

I have three columns in excel named

(OP)
I have three columns in excel named supervisor,Inspector, wpr
I want to get a result in new cell
If supervisor is yes
Imspector is ywpr is no then its result shoul ne " S-I " or if supervisor is yes inspector is yes wpr is yes then result should be "SIW"

RE: I have three columns in excel named

And the other 6 cases?

RE: I have three columns in excel named

Just make a truth table to be sure that you have covered all 8 binary cases. You have defined 2 cases.

Here's a start...

Supervisor Inspector wpr Result
Y          Y         Y   "SIW"
Y          Y         N   " S-I "
Y          N         Y	
Y          N         N	
...
 

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

"The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein

You Matter...
unless you multiply yourself by the speed of light squared, then...
You Energy!

RE: I have three columns in excel named

I'm just gonna cut to the chase.

Generally in instances where you have more than 3 cases, like yours, the DATA ought to reside in a TABLE rather than in a formula. Using the technique featured below as a multiple criteria lookup will perform as long as each combination of criteria references one and only one Row in the lookup table.

In regard to any changes that might occur in the future, it's so much easier to change DATA in a table than to figure out how to modify DATA in a FORMULA, which is part of a principle known as maintainability.

So here's my solution:

My Truth/Lookup Table is a Structured Table named Table2...


And you can see My Formula...
I2: =INDEX(D:D,SUMPRODUCT((Table2[Supervisor]=F2)*(Table2[[Inspector ]]=G2)*(Table2[wpr]=H2)*ROW(Table2[Result])))


Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

"The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein

You Matter...
unless you multiply yourself by the speed of light squared, then...
You Energy!

RE: I have three columns in excel named

Here is another 'interpretation' of EFFEY's requirements...

In cell D2:
=IF(A2="Y", LEFT($A$1, 1), "") & IF(B2="Y", LEFT($B$1, 1), "") & IF(C2="Y", LEFT($C$1, 1), "")


Which is simply - wherever we have Y in the column, give me first letter from row 1 in this column.

Who knows... ponder

---- Andy

"Hmm...they have the internet on computers now"--Homer Simpson

RE: I have three columns in excel named

(OP)
Thanks Andrzejek

wowwww It works.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close