Column Rearrange same row

M

mypetduke

Okay this is for the bright ones out there, or is it easy?.

I have a lot of text in cells all scattered along the same Row but it's not
aligned into the same Column. The macro can know easily what column it goes
into (again without changing the row which all stays together) because the
first part of the text is named like the Column. For example if the text says
"Name John" then it needs to be placed in the Column that says "Name."

So in other words the Macro would take all the contents of this cell just
because it starts with "Name" and place the whole thing "Name John" into the
Column that says "Name" without moving it outside the original row. There
are about 30 different Columns and they change for each project/worksheet so
I need a Macro where I can choose the new Column names and the text is
scanned and placed into the respective named columns.
Is this too tough a job for this site?

Example:

Text before Sorting

Name Car House
Name John Car Chevy House Ranch
Car Ford Name Mary a blank cell
House Blue Car Chrysler Name Bob

After Macro Sort Column Rearrange

Name Car House
Name John Car Chevy House Ranch
Name Mary Car Ford an actual blank cell (nothing
here at all)
Name Bob Car Chrysler House Blue

As you can see sometimes there is no value for a column or row and that's
okay and should stay blank since it has no name that matches the Column Name

So I should be able to make a list

1. A
2. B
3. C
4. etc.

and the Macro/code would know that the terms in the list are the new Columns
which means, too, it is also the beginning words of the text in the cells to
be rearranged.
 
J

joel

Usually these type problems should be fixed before the data is placed into an
excel spreadsheet. I need a sample of the source data to be able to fix the
problem. Problems like this occur because the TEXT-TO-COLUNS function in
excel didn't correctly determine where each to the columns started and ended.
yo may of had TAB delimited data and excel though it was fixed width data
and put the information in the wrong spot. The problem is probably due to
some information misssing in each row.

The TEXT-TO_COLUMN (DATA menu) function is also part of the reading text
data (File - Open) and is also used in the Data - Import External Data menu
options.
 
M

mypetduke

Yes the data comes from PDF and isn't always exactly in the same order
because the information varies and so the next cell will not follow
sequentially. Are you saying there's a way to download it in correct cells
even given this fact?
 
J

joel

I usually can convert almost anything EXCEPT PFD. I tried a few times in the
past and have not been very successful. Adobe puposely makes it difficult to
convert so you have to buy there converter (Adobe profesional writer which
has a PDF to word converter). From word you can easily go to excel. There
are a few other converters on the market.converters.

I've been successful in converting parts of a pdf document but never the
whole thing. Adobe has several differnt format for a PDF file and some
converter better than others.
 
R

ryguy7272

Joel, I think it depends on how the PDF is saved. Some save methods are
conducive to converting to Excel and some are not. I think Shift+V usually
works, but again, I think it depends on how the PDF was saved. Send me an
email and I will send you more info. on this.

HTH,
Ryan---
(e-mail address removed)
 
J

joel

You are right it depends on how the pdf was saved how much daa you can get.
But the data you are getting is very difficult to fix using a macro. I've
tried before and have failed, and if I can't do it nobody can. I don't want
to try again.
 

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