• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Find a specified text

riyazpattan619

New Member
Hi Friends,

Seeking your attention on the below scenario.

Scenario 1: This Condition is working...
=LOOKUP(A2,{"DIAMOND","PREMIERE PLUS","PLATINUM","PREMIERE"},{"DIAMOND","PREMIERE PLUS","PLATINUM","PREMIERE"})

Scenario 2: This condition is not working.
=LOOKUP(A2:A20,{"DIAMOND","PREMIERE PLUS","PLATINUM","PREMIERE"},{"DIAMOND","PREMIERE PLUS","PLATINUM","PREMIERE"})

I do hope that by looking at the scenario you may understand what I mean to expect. Rather providing the whole story here, would like to give a brief understanding here.

"I'm looking for second scenario to be worked, where in a column range if "Diamond" appears, then the same should populate, and same for the rest. No chance of any two or three appearing in the column.

Appreciate your valuable time.

Riyaz
 
Perhaps you are looking for something on following lines:

=LOOKUP(2,1/COUNTIF(A2:A20,{"DIAMOND","PREMIERE PLUS","PLATINUM","PREMIERE"}),{"DIAMOND","PREMIERE PLUS","PLATINUM","PREMIERE"})
 
Hi Riyaz,

I may have missed your question, but I think your formula is doing the same thing as these:

=VLOOKUP("*",A2:A20,1,0)
=INDEX(A2:A20,MATCH("*",A2:A20,0))

You can also add a check something like:

=IF(SUM(COUNTIF(A2:A20,{"DIAMOND","PREMIERE PLUS","PLATINUM","PREMIERE"}))>0, VLOOKUP("*",A2:A20,1,0),"")

Regards,
 
Hi Riyaz,

I may have missed your question, but I think your formula is doing the same thing as these:

=VLOOKUP("*",A2:A20,1,0)
=INDEX(A2:A20,MATCH("*",A2:A20,0))

You can also add a check something like:

=IF(SUM(COUNTIF(A2:A20,{"DIAMOND","PREMIERE PLUS","PLATINUM","PREMIERE"}))>0, VLOOKUP("*",A2:A20,1,0),"")

Regards,


My Friend Khalid,

The below one is working.As suggested by Mr. Shrivallabha.

=LOOKUP(2,1/COUNTIF(A2:A20,{"DIAMOND","PREMIERE PLUS","PLATINUM","PREMIERE"}),{"DIAMOND","PREMIERE PLUS","PLATINUM","PREMIERE"})

Thank you for your inputs.

Riyaz
 
Back
Top