View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
SMD SMD is offline
external usenet poster
 
Posts: 6
Default Extracting data from Excel

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

"Don Guillett" wrote:

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

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"SMD" wrote in message
...
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