Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 139
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula to match Cell with table of contents Terry Excel Discussion (Misc queries) 1 May 20th 10 08:15 PM
Creating cell names from cell contents en masse John[_26_] Excel Worksheet Functions 1 May 15th 09 02:41 AM
Creating .txt files based on cell contents Matt Bennette[_2_] Excel Discussion (Misc queries) 4 January 5th 09 04:17 PM
Creating a table of contents in Excel forest8 Excel Worksheet Functions 1 March 8th 08 02:21 PM
Pivot Table changes cell contents - Excel 2002 Steve H Excel Discussion (Misc queries) 0 January 15th 08 10:43 AM


All times are GMT +1. The time now is 12:45 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"