• 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.

match and lookup diff clm with two diff. criteria

ganeshm

Member
hi...

i am trying to vlookup and get the matching date in the corresponding column. I am able to match only one criteria. When i try other criteria, the result is blank.
File attached for your reference..


thanks
 

Attachments

  • candidate.xls
    42.5 KB · Views: 8
You are using merged cells, they is no situation when merged should be used. EVER


Avoid merging cells


Merged cells can help you arrange values in a meaningful way, but they come with problems -- numerous problems, big problems.


For instance, Excel won't apply column formats to a merged cell unless you select all the columns that comprise the merge.


In addition, not all cell formats, stick once you emerge a cell.


You can't sort a column with merged cells.


You can't even select a single-column range if there's a merged cell in it -- go ahead, try!, the whole column will become merged, not good.


You cannot put a filter on it. The problem is the filter is completely useless because the filter will groan with the "merged cells need to be identically sized." Warning, which in English means you have to make each group of merged cells the same size as the largest group. And you have to find them all!


Merging cells in columns and rows could lead to data loss, bad thing.


Formulas and Functions that refer to merged cells will not work, bad thing.


Don't hesitate to use merged cells if you really need them (you don’t), but they will limit what you can do to the cells and even the columns involved.


Center Across Selection is a far better alternative to merging.


To apply this format, select the cells you want to appear merged and then launch the Alignment group dialog, Ctrl + 1, and click the Alignment tab. Center Across Selection is in the Horizontal drop-down.


You will get the desired look you want but without the merged cell's problems.
 
Unmerge cells in Sheet2!D2:M2

Change Sheet1!AE5: =iferror(INDEX(Sheet2!$B$4:$M$26,MATCH($G$3,Sheet2!$B$4:$B$26,0),2+MATCH($AE$3,Sheet2!$D$2:$M$2,0)),"")

Change Sheet1!AE7:
=IFERROR(INDEX(Sheet2!$B$4:$M$26,MATCH($G$3,Sheet2!$B$4:$B$26,0),2+MATCH($AE$3,Sheet2!$D$2:$M$2,0)+1),"")
 
thank you hui, thank you very much, solved.

thank you bob, as advised by both of you i have unmerged the cells and now it is working.

I didn't know that i have to use

1. MATCH($G$3,Sheet2!$B$4:$B$26,0),2 (where 2 denotes to column).
thanks i learnt today something specific in Match function.

Regards,
ganeshm
 
That 2 has nothing to do with the match before it
It is used as an offset for the following match
 
Back
Top