Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On May 8, 11:24*pm, Per Jessen wrote:
Hi With before data in columns A:C and "after" data in columns D:F, try this. Sub seperate() firstRow = 2 LastRow = Range("A" & Rows.Count).End(xlUp).Row rw = 2 For r = firstRow To LastRow * * Comp = Range("A" & r).Value * * txt = Split(Range("C" & r).Value, ",") * * For c = 0 To UBound(txt) * * * * Range("D" & rw) = Comp * * * * Range("E" & rw) = 1 * * * * Range("F" & rw) = txt(c) * * * * rw = rw + 1 * * Next Next End Sub Hopes this helps. --- Per On 8 Maj, 16:57, geniusideas wrote: I wanted to seperate text with comma in a cell into different row for example Before : Capasitor * * * 3 * * * * C123,C124,C125 Diode * * * * * * 2 * * * * D110,111 Transistor * * * 3 * * * * T101,T102,T103 After Capasitor * * * *1 * * * * *C123 Capasitor * * * *1 * * * * *C124 Capasitor * * * *1 * * * * *C125 Diode * * * * * * *1 * * * * *D110 Diode * * * * * * *1 * * * * *D111 Transistor * * * *1 * * * * *T101 Transistor * * * *1 * * * * *T102 Transistor * * * *1 * * * * *T103 How to create Excel VBA ? Need urgently...pls help guy Tq for code, it's work. the only thing I need to remove the original list meaning new list will be in same column.Your vb code create a list in another column. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
add two cells from seperate work sheets into a cell on seperate wo | Excel Worksheet Functions | |||
How do I seperate a full name field out into three seperate columns? | Excel Worksheet Functions | |||
seperate first 2 lines of column in seperate columns in same row | Excel Discussion (Misc queries) | |||
How to seperate data in a cell which is split by a comma | Excel Worksheet Functions | |||
Split Cell Into Seperate Rows | Excel Programming |