.csv file conversion

A

Amber_D_Laws

Hello again everyone,

I have a new file I am working with this time. This one I need to
extract data from a .csv file into an Excel file, and rearrange the
data to make it appear a certin way. Esentially the .csv file has
sample data listed in rows with Sample Type, Method Type, Compound
Name, Measurement Units, and Results as the columns.
A programmer no longer with the company created a mini-program that
takes these columns and rows and rearranges them so that the compund
Name and units becomes the column header, and the results are reported
in rows below with row headers of the sample type. I am trying to
create a macro that will duplicate this result.
I don't even know where to begin. I haven't done anything like this
before, and I am so lost I don't even know how to start researching
what I want to do.
Do to being as lost as I am, I don't have any code started. Any advice
or guidence will be appreciated.

Here's to hope,
Amber:)
 
C

Crowbar via OfficeKB.com

Save it as a text file

Open excel

click record macro

open the text file in excel

insert your arrays (column breaks)

click next

And your almost there

Click stop recorder

If you save the script next time it will automatically break the file down
into excel format
 
C

Crowbar via OfficeKB.com

Missed the bit about you being a beginner

Alternatively you could send your .csv file to (e-mail address removed), I will do
it and send it you back to you all done
as I have a bit of free time at the minute
 
T

Tom Ogilvy

Open the file in Excel

Select the Data and do

Data=>Pivot Table Report (and Chart)

click next
click the layout button and drag the Compound name and Measurement units to
the Column area
Drag Sample Type (and possibly Method Type) to the Row area
Drag Results to the data area

Click OK
Make sure New sheet is selected and Click OK

In the resulting sheet, select the Data button and drag it have a cell width
to the right and release.

If this isn't exactly what you want, right click in the pivot table and
select pivot wizard. go back to the layout button and try changing things
until you get what you need.

--
Regards,
Tom Ogilvy

"Amber_D_Laws" <[email protected]>
wrote in message
news:[email protected]...
 
A

Amber_D_Laws

Tom,
Will the pivot table creation record in a macro? I am trying to build
this for a co-worker.

Crowbar,
Thanks for the offer, but I would like to try and do it myself. I am a
beginner, but I want to learn as much as I can and having you write if
for me would defeat that purpose. I have until April to get this done,
so I intend to start with you and Tom's ideas, and if I can't get it I
may take you up on building it for me.

Thanks,
Amber
 
T

Tim Williams

Amber,

I'm sure you will get help here. It might be a bit tricky to give anything
other than general adice though, without knowing the exact layout of the
file.

Just a suggestion: it helps to quote whatever you're replying to in any
message you post. Many people don't use a web interface to read this group,
and hide messages they've already read, so it's not clear what you're
replying to if you don't quote.

Tim

--
Tim Williams
Palo Alto, CA


"Amber_D_Laws" <[email protected]>
wrote in message
news:[email protected]...
 
A

Amber_D_Laws

Crowbar,

Please see the email you mentioned above. I have sent something to you
that may illuminate the problem further.

Regards,
Amber
 
A

Amber_D_Laws

Thanks for the encoragement Tim,

I knew about quoting, I frankly just forgot. I have sent the files to
Crowbar, hopefully we will get somewhere.

See ya' around,
Amber
 
A

Amber_D_Laws

Tom,

I will try recording the macro, and let you know how far I get. I am
sure that this will be a long process, but I am encoraged by the
support recieved thus far.

Amber
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top