"Simple" script needed for MS Excel 2008

Posted by: needtoknow

"Simple" script needed for MS Excel 2008 - 01/07/11 12:38 PM

Hello
I'm not sure if this is all that simple.

I was expecting to use macros when I found that my version of Excel does not support them. What I'm looking at it a piece of Apple Script that will do the following within the document:

I have a document with 1900 or so rows of information.
Each row has an address spread out in columns horizontally from left to right, 7 columns total, so A through G, starting with company name, contact name, address line 1 address line 2, city, state, zip.

What I need is to be able to do is consolidate the contents of all cells to the right of Row A in each row, to be placed under the contents of the Row A cell. I'm supposed to end up with an address block contained all in one cell. When all is said and done, I should have the same number of rows, but only one column.

My insane boss asked me to do this, not sure why he is not choosing some kind of database program which can arrange cells as fields, but he's doing the paying, and I hate to argue with him.

I have absolutely no programming experience whatsoever, and am looking for some help on this if possible (is it possible to do what I need with a piece of Apple Script?)

Thanks to anyone who can help,
needtoknow
Posted by: Jim_

Re: "Simple" script needed for MS Excel 2008 - 01/07/11 04:08 PM

What version of Excel?
Posted by: MacBozo

Re: "Simple" script needed for MS Excel 2008 - 01/07/11 04:11 PM

Originally Posted By: Reboot
What version of Excel?


The subject states it. Long day? laugh
Posted by: Jim_

Re: "Simple" script needed for MS Excel 2008 - 01/07/11 05:45 PM

dee dee dee blush

Yes, I hate when I have to actually work for a living, but it makes my creditors happy.

If the file is a delimited text file the poster can open it in Excel and do a concatenate of columns. Wonder if they'll stop back for that sage advice or is it a drive by. smirk
Posted by: needtoknow

Re: "Simple" script needed for MS Excel 2008 - 01/08/11 07:13 AM

Not a drive by smile
I will report back... but it is originally an excel file
Posted by: Jim_

Re: "Simple" script needed for MS Excel 2008 - 01/08/11 07:59 AM

Duck!!! j/k

If it's an Excel file in columns then you can just concatenate the columns with a Function under the Insert menu item.
Posted by: needtoknow

Re: "Simple" script needed for MS Excel 2008 - 01/09/11 01:53 PM

Ok... I will try that.. have never really used functions before. Any tips or suggestions for someone doing this for the first time, or it's it self-explanatory as you do it?
Thank you so much by the way.. esp. considering my convoluted description of my issue.
Posted by: needtoknow

Re: "Simple" script needed for MS Excel 2008 - 01/09/11 03:20 PM

OK... success!!! Thank you... a little reading and some experimenting and voila!

Wondering one final thing... do you know if it is possible to put a line break inserted between each cell field, within the conactenate function command?
Basically, my job is done if I can get the conactenated cell information to assemble vertically within the destination cell like a proper address block.
Otherwise put and with a visual aid:

A-1 is the destination cell. A-1 contains:

A-2 (COMPANY NAME)(line break)
B-2 (CONTACT)(line break)
C-2 (ADDRESS LINE 1)(line break)
D-2 (ADDRESS LINE 2)(line break)
E-2 (CITY)(line break)
F-2 (STATE)(line break)
G-2 (ZIP CODE)(line break)

(hyphens added just to separate the numbers and letters, I don't ref them that way in the prog.)