Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Unable to Search Merged Cells with V-lookup in Excel 2007

Posted on 2011-02-11
6
Medium Priority
?
308 Views
Last Modified: 2012-05-11
I receive quarterly database update files up to 20,000 rows long. Column A contains some merged cells. I need to perform v-lookups to compare my data to their file information in column B & C. This gives me all the applicable rev codes for any given procedure code.

1) How do I perform a v-lookup with multiple results possible?

2) Is there a way to un-merge the cells in column A and duplicate the correct procedure code into the newly created blank cells?

I greatly appreciate any assistance, and there is no rush.
 Example-1.xlsx
0
Comment
Question by:nts42a
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 5

Accepted Solution

by:
roger_karam earned 2000 total points
ID: 34874106
Both vlookup and pivot tables use the first result. You would have to use a macro to unmerge. This one worked for me:

Sub unmerger()

Dim rReference As Range
Dim rIterator As Range


Set rReference = ActiveSheet.Range("A1:A20000")


For Each rIterator In rReference

If rIterator.MergeCells = True Then

rIterator.MergeCells = False

If rIterator.Offset(1, 0).Value = "" Then

rIterator.Offset(1, 0).Value = rIterator.Value
End If

End If


Next rIterator


End Sub
0
 
LVL 5

Expert Comment

by:roger_karam
ID: 34874127
oh, and after unmerging use a Pivot Table with the values you want to see in Column - this will show both values while using vlookup will still only return the first.

Sincerely,
RK
0
 

Author Comment

by:nts42a
ID: 34874437
Well, that was a start. It did unmerge the cells, and copied some of the data to blank cells. However, it leaves a significant number empty. Example-2.xlsx
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Assisted Solution

by:nts42a
nts42a earned 0 total points
ID: 34874906
I was able to find a solution to this last question from a previous thread (Title: if null excel.) Thanks - matthewspatrick. I will accept multiple solutions and award points. Then I will post the next question if I am unable to find a previous thread dealing with the multiple data returns.
0
 

Author Closing Comment

by:nts42a
ID: 34904858
I would also like to thank matthewspatrick for "Title if null excel"
0
 
LVL 5

Expert Comment

by:roger_karam
ID: 34935095
Thanks for the points nts42a! Sorry i missed the blank cells.

sincerely,
RK
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

My attempt to use PowerShell and other great resources found online to simplify the deployment of Office 365 ProPlus client components to any workstation that needs it, regardless of existing Office components that may be needing attention.
After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question