Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Creating table from cell contents
Mornin' all,
I've got a table with company details on it, then a list of product codes that the company sells. I want to write a new table, for the moment just a new worksheet would be great, based on the product codes. I'd like to take a record like this (where the ' - ' bit specifies a new column): R1FQ33 - 20780P,41930P and turn it into this: R1FQ33 - 20780 - P R1FQ33 - 41930 - P Has anyone done something along these lines before? If so, can you help me get started plese? Thanks very much, Foss |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Creating table from cell contents
Hi
I would write something like this For Each cell In Range("mydata") cell.Copy Range("new").Select ActiveSheet.Paste ActiveCell.Offset(0, 1) = "=mid(vlookup(rc[-1],myrange,2,false),1,5)" ActiveCell.Offset(0, 2) = "=mid(vlookup(rc[-2],myrange,2,false),6,1)" ActiveCell.Offset(1, 1) = "=mid(vlookup(rc[-1],myrange,2,false),8,5)" ActiveCell.Offset(1, 2) = "=mid(vlookup(rc[-2],myrange,2,false),13,1)" ActiveCell.Offset(2, 0).Range("a1:a2").Name = "new" Next cell where mydata is range of data with R1FQ33 and myrange is range of all data and new is 2 rows where new data is required hope this helps "Foss" wrote: Mornin' all, I've got a table with company details on it, then a list of product codes that the company sells. I want to write a new table, for the moment just a new worksheet would be great, based on the product codes. I'd like to take a record like this (where the ' - ' bit specifies a new column): R1FQ33 - 20780P,41930P and turn it into this: R1FQ33 - 20780 - P R1FQ33 - 41930 - P Has anyone done something along these lines before? If so, can you help me get started plese? Thanks very much, Foss |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Formula to match Cell with table of contents | Excel Discussion (Misc queries) | |||
Creating cell names from cell contents en masse | Excel Worksheet Functions | |||
Creating .txt files based on cell contents | Excel Discussion (Misc queries) | |||
Creating a table of contents in Excel | Excel Worksheet Functions | |||
Pivot Table changes cell contents - Excel 2002 | Excel Discussion (Misc queries) |