Extracting data from Excel

S

SMD

In column A2 I have this number 91-109002-000-A. In column G, I have several
109002 -000. I want to be able to compare A2 to all of G and if the
number is similar (what I call the base number), then I need for the formula
to look at column H and extract that information. So there may be more than
one answer for my extraction. Example:
(A) (G) (H)
Extraction would read
(2) 91-109002-000-A 109002-000 350574 350574,350575,643225
109002-000 350575
109002-000 643225
 
D

Don Guillett

Sub getpartialdata()
mn = "109002-000"
For Each c In Range("g1:g3")
If InStr(c, mn) Then
ms = ms & " " & c.Offset(, 1)
End If
Next
MsgBox ms
'range("i2")=ms'??
End Sub
 
S

SMD

Don, Thanks for your quick reply. Column A2 will have many more numbers. I
was hoping to use a formula.
 
D

Don Guillett

If desired, send your file to my address below along with this msg and
a clear explanation of what you want and before/after examples.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top