Hlookup with a Merged Cell....is this possible

Mark McInerney

Active Member
Joined
Apr 4, 2012
Messages
259
Office Version
  1. 365
Platform
  1. Windows
Hi All,

I have a merged cell from a1 to c3 - the value in that cell is "5". Column A, B and C (under that merged cell) is filled with various values.

If I do a Hlookup on the value 5, it automatically returns the values stored in column A, is it possible for me to return the value that is found in column B rather than A?
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
First, merged cells is nearly always undesirable. It causes many problems, one of which you have discovered.

You cannot do this with HLOOKUP. Any value found in the merged cells by HLOOKUP will be considered to be in A1. If you want to look for a value in the merged range and return the value in B under the merged range use:

Excel Formula:
=INDEX(A4:C4,1, MATCH(5, A1:C1, 0)+1)

$scratch.xlsm
ABCDE
15B
2
3
4ABC
Do Not Merge
Cell Formulas
RangeFormula
E1E1=INDEX(A4:C4,1, MATCH(5, A1:C1, 0)+1)
 
Upvote 0

Forum statistics

Threads
1,213,521
Messages
6,114,104
Members
448,548
Latest member
harryls

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top