ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Matching values in 1 column to data in another (https://www.excelbanter.com/excel-programming/332206-matching-values-1-column-data-another.html)

Oreg[_23_]

Matching values in 1 column to data in another
 

Hello,

Pulling what's left of my hair out trying to come up with a solution.
I have a column (G), with a list of IDs (IWEC44332). Each ID has
numbers associated with it in another column (F). I would like t
create a macro or function to search column G and list both number
associated with the ID #. Displaying those numbers either together i
1 column (H) or 2 columns (H & I). Is this possible ??

--
Ore
-----------------------------------------------------------------------
Oreg's Profile: http://www.excelforum.com/member.php...nfo&userid=919
View this thread: http://www.excelforum.com/showthread.php?threadid=38030


Oreg[_24_]

Matching values in 1 column to data in another
 

Thanks a bunch anilsolipuram, I'll give it a shot and let you know! :

--
Ore
-----------------------------------------------------------------------
Oreg's Profile: http://www.excelforum.com/member.php...nfo&userid=919
View this thread: http://www.excelforum.com/showthread.php?threadid=38030


Don Guillett[_4_]

Matching values in 1 column to data in another
 
a simple find macro should help. Modify to suit
Sub findem()
For Each c In Range("e7:e" & Cells(Rows.Count, "e").End(xlUp).Row)
c.Offset(0, 1) = Columns("h").Find(c).Offset(0, 1)
Next
End Sub

--
Don Guillett
SalesAid Software

"Oreg" wrote in message
...

Hello,

Pulling what's left of my hair out trying to come up with a solution.
I have a column (G), with a list of IDs (IWEC44332). Each ID has 2
numbers associated with it in another column (F). I would like to
create a macro or function to search column G and list both numbers
associated with the ID #. Displaying those numbers either together in
1 column (H) or 2 columns (H & I). Is this possible ???


--
Oreg
------------------------------------------------------------------------
Oreg's Profile:

http://www.excelforum.com/member.php...fo&userid=9195
View this thread: http://www.excelforum.com/showthread...hreadid=380308




Oreg[_25_]

Matching values in 1 column to data in another
 

anilsolipuram & Don, Neither macros were working for me so I went back
to my original message and noticed I mixed up my columns and should
have been more descriptive. I tried to modify your macros with no
luck.. Column (F) is a list of IDs. Example: IWEC432151,
IWEC968489..... In column (F), each IWEC # shows up twice. In Column
(G) are other numbers associated to the IWEC #. Example: 1,2,5,15....
The outcome I am hoping for is a macro to search column G, list each
IWEC number once in column (H), match the data in Column (G) and list
it in Columns (I) & (J).

Example:
Columns F G H I J
IWEC456934 1 IWEC456934 1 5
IWEC790234 2 IWEC790234 2 15
IWEC456934 5
IWEC790234 15

Thanks,
Oreg


--
Oreg
------------------------------------------------------------------------
Oreg's Profile: http://www.excelforum.com/member.php...fo&userid=9195
View this thread: http://www.excelforum.com/showthread...hreadid=380308


anilsolipuram[_78_]

Matching values in 1 column to data in another
 

You have to select all columns and sort it by ids first.

I am assuming the ids range from f2:f88, you can edit the range as yo
want.

try it now and let me know what ever

Sub Macro1()
Dim INIT, I, r, val As Variant
Dim ra As Range
I = 0
Range("f2:f88").Select
Set ra = Selection
For Each c In ra

If I = 0 Then

INIT = c.Value
r = c.Row
I = 1
Else

If (c.Value = INIT) Then
val = val & c.Row & ","
Else
MsgBox val
t = Split(val, ",")
If UBound(t) 0 Then
Range("h" & r).Value = Range("f" & r).Value
Range("i" & r).Value = Range("g" & r).Value
For j = 0 To UBound(t)
temp = t(j)
If temp = "" Then
GoTo a:
Else
Range("i" & r).Offset(0, j + 1).Value
Range("g" & temp).Value
End If
Next
a:
End If
val = ""
INIT = c.Value
r = c.Row
End If
End If
If c.Value = "" Then
End
End If
Next
End Su

--
anilsolipura
-----------------------------------------------------------------------
anilsolipuram's Profile: http://www.excelforum.com/member.php...fo&userid=1627
View this thread: http://www.excelforum.com/showthread.php?threadid=38030


Oreg[_26_]

Matching values in 1 column to data in another
 

anilsolipuram,

WOW!!!! This works great! Thanks so much for taking the time

--
Ore
-----------------------------------------------------------------------
Oreg's Profile: http://www.excelforum.com/member.php...nfo&userid=919
View this thread: http://www.excelforum.com/showthread.php?threadid=38030


Don Guillett[_4_]

Matching values in 1 column to data in another
 
What I sent was tested and will work, without any sorting, if properly
modified to your data.

--
Don Guillett
SalesAid Software

"Oreg" wrote in message
...

anilsolipuram & Don, Neither macros were working for me so I went back
to my original message and noticed I mixed up my columns and should
have been more descriptive. I tried to modify your macros with no
luck.. Column (F) is a list of IDs. Example: IWEC432151,
IWEC968489..... In column (F), each IWEC # shows up twice. In Column
(G) are other numbers associated to the IWEC #. Example: 1,2,5,15....
The outcome I am hoping for is a macro to search column G, list each
IWEC number once in column (H), match the data in Column (G) and list
it in Columns (I) & (J).

Example:
Columns F G H I J
IWEC456934 1 IWEC456934 1 5
IWEC790234 2 IWEC790234 2 15
IWEC456934 5
IWEC790234 15

Thanks,
Oreg


--
Oreg
------------------------------------------------------------------------
Oreg's Profile:

http://www.excelforum.com/member.php...fo&userid=9195
View this thread: http://www.excelforum.com/showthread...hreadid=380308





All times are GMT +1. The time now is 08:30 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com