Lookups targeting merged cells - only returning value for first row

Posted by Ian on Super User See other posts from Super User or by Ian
Published on 2012-01-09T12:40:12Z Indexed on 2012/03/23 23:32 UTC
Read the original article Hit count: 194

I have a master worksheet which contains data that I wish to link to another 'summary' sheet using a lookup.

However, some of the cells whose data I wish to include in the summary sheet are merged across two or more adjacent rows. To be clear, the 'primary' column A that I am using in my formula in order to identify the target row does not contain merged cells, but the column from which I wish to return a value does.

I have tried VLOOKUP and INDEX+MATCH. The problem is that the data is only returned for the first row's key, and the others return zero (as though the cell in the target column were blank, where actually it is merged).

I have tried inelegant ways around this, e.g. using IF statements to try to find the top row of the merged cell. However, these don't work well if the order of values in the summary sheet is different from that in the master sheet, as well as being messy.

Can this be done?

© Super User or respective owner

Related posts about microsoft-excel

Related posts about excel-2007