could you please explain or show me the formula... the lookup_value will point to following merged cells (E-J 22)
thanks
Main Topics
Browse All TopicsWHEN USING THE VLOOKUP COMMAND, CAN YOU POINT THE VLOOKUP VALUE TO A MERGED CELL
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
bradfork,
Could you please post your formula and describe which cells are merged?
"the lookup value will point to the following merged cells" Do you mean the formula is placed in that merged range? Or the first parameter of the VLOOKUP is from that merged range. Or that you are looking to return a value from a column in that range?
Here is a sample workbook showing how you handle the column references in a VLOOKUP formula http://home.mchsi.com/~byu
Brad
bradfork,
That formula is working perfectly in my test workbook. I'm thinking maybe the problem is unique to your workbook, and that it would be best if I could take a look at your file.
Many ISP allow their customers to create a personal web page. If so, you can post your file there, and then put the link in a Comment. This is the approach that I take.
You can post your workbook for free at Geocities: http://geocities.yahoo.com
Another popular free site is AngelFire http://www.angelfire.lycos
If none of the above work out for you, I would be willing to post a link to your file if you e-mail it to me. My address at the bottom of my Experts-Exchange profile--just double-click my screen name at the top of this comment.
Brad
Brad,
Here's the link to your file. I'll be taking a look at a little later, but wanted to give anyone else looking at this question a chance to work on it in the mean time.
http://home.mchsi.com/~byu
Brad
Brad,
The formula in cell D22 returns #N/A error value because C22 is blank.
=VLOOKUP(C22,Sheet2!A2:D23
This formula avoids the error value. Column D will be filled when the user chooses something in the data validation dropdown in column C.
=IF(ISERROR(VLOOKUP(C22,Sh
Brad
Brad,
I think you are seeing the warning icon (! inside a manilla colored diamond) when Excel 2003 sees a formula in the active cell that returns an error value. You can turn this "feature" off with the Tools...Options...Error Checking menu item by unchecking the box for "Enable background error checking".
Brad
bradfork,
In my copy of Excel 2003 SP1, I see the warning message "A value is not available to the formula or function." I'm not seeing any reference to "C22,Sheet2". These comments apply apply to the file just as you mailed it.
You can see the service pack level in the Help...About Excel menu item.
Incidently, if you are protecting the workbook to hide Sheet2 and Sheet3--the user can navigate to those sheets by clicking the dropdown arrow to the right of the Address Bar (the horizontal white rectangle above the intersection of the row and column headers) and choosing inventory, DESCRIPTION, ITEM_NO or SALES_ADVISOR from the resulting dropdown.
The following two macros will do a more effective job of protecting the workbook. The first one runs automatically when the workbook opens, and hides the second and third worksheets. The other macro unhides Sheet2 and Sheet3 so you can update the data. They need to go in the ThisWorkbook code pane.
Both macros can be run from the ALT + F8 macro selector--but won't appear in the list of available macros because of the Private keyword. The trick is you need to type in the command in the "Macro name" field in the ALT + F8 macro selector--either ThisWorkbook!Workbook_Open
Private Sub Workbook_Open()
Worksheets(2).Visible = xlVeryHidden
Worksheets(3).Visible = xlVeryHidden
End Sub
Private Sub UpdateData()
Worksheets(2).Visible = True
Worksheets(3).Visible = True
End Sub
To install the sub in the code pane for ThisWorkbook:
1) ALT + F11 to open the VBA Editor
2) If you don't see a list of VBA projects on the left, then CTRL + R to open the Project Explorer
3) In the Project Explorer window, double-click ThisWorkbook to open its code pane
4) Paste the suggested code in the resulting module sheet
5) ALT + F11 to return to the spreadsheet
Brad
Brad,
I found that locking the cells in D22:F35 got rid of the warning message. You do this with the Format...Cells...Protectio
Here is your worksheet modified with a slightly simpler formula:
=IF($C22="","",VLOOKUP($C2
This formula is displaying a blank at my end until something is chosen in the dropdown in column C.
You can use similar formulas for cells E22:F36
=IF($C22="","",VLOOKUP($C2
=IF($C22="",0,VLOOKUP($C22
I changed inventory, ITEM_NO, DESCRIPTION and SALES_ADVISOR into dynamic named ranges. You won't need to change any named formulas as you add data to Sheet2 and Sheet3 because the named ranges automatically update with additions and deletions. You do this with a "Refers to" formula like:
=Sheet2!$A$2:INDEX(Sheet2!
=INDEX(inventory,,3) DESCRIPTION
=INDEX(inventory,,1) ITEM_NO
=Sheet3!$A$1:INDEX(Sheet3!
I locked the header row in Sheet2 by selecting cell A2 and using the Windows...Freeze Panes menu item
Brad
Brad
Thank you so much. I asked a simple question, and you went beyond what I could have expected as an answer. You provided me with outstanding info and I appreciate all the time and effort you put into helping me solve this problem. This just reconfirms that if you have questions, EE is the only place to find them.
Thanks again, your awesome.
Business Accounts
Answer for Membership
by: byundtPosted on 2005-02-19 at 14:18:57ID: 13355222
Hi bradfork,
Columns K:L and M:N were merged in the range K3:N5
Can you use merged cells in a VLOOKUP formula? Definitely.
The tricky part is the column reference (third parameter). You need to count each column--including those in the merged ranges. So if I have a two-column table, each column of which contains two merged columns, the formula should reference column 3. That's because the first "column" is two columns, and the second "column" contains the value in its left-most column.
=VLOOKUP(I1,K3:N5,3,FALSE)
Cheers!
Brad