Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
MATCHING A VALUE IN A CELL TO A COLUMN OF VALUES IN ANOTHER SHEET | Excel Discussion (Misc queries) | |||
If two criteria match then sum matching values in another column | Excel Worksheet Functions | |||
Select 50 greatest values with column matching | Excel Discussion (Misc queries) | |||
returning all matching values in column A that have the same value for columnB | Excel Worksheet Functions | |||
Matching values in 1 column to data in another | Excel Programming |