Previous Thread
Next Thread
Print Thread
Hop To
"Simple" script needed for MS Excel 2008 #548778 01/07/11 08:38 PM
Joined: Jan 2011
Posts: 4
N
needtoknow Offline OP
OP Offline
N
Joined: Jan 2011
Posts: 4
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

Re: "Simple" script needed for MS Excel 2008 [Re: needtoknow] #548790 01/08/11 12:08 AM
Joined: Apr 2002
Posts: 15,080
Reboot Online Content
Muhahahaha
Online Content
Muhahahaha
Joined: Apr 2002
Posts: 15,080
What version of Excel?

Re: "Simple" script needed for MS Excel 2008 [Re: Reboot] #548791 01/08/11 12:11 AM
Joined: Apr 2002
Posts: 17,706
MacBozo Offline
Nut Dood
Offline
Nut Dood
Joined: Apr 2002
Posts: 17,706
Originally Posted By: Reboot
What version of Excel?


The subject states it. Long day? laugh


[Linked Image from dl.dropbox.com]
Re: "Simple" script needed for MS Excel 2008 [Re: MacBozo] #548800 01/08/11 01:45 AM
Joined: Apr 2002
Posts: 15,080
Reboot Online Content
Muhahahaha
Online Content
Muhahahaha
Joined: Apr 2002
Posts: 15,080
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

Re: "Simple" script needed for MS Excel 2008 [Re: Reboot] #548842 01/08/11 03:13 PM
Joined: Jan 2011
Posts: 4
N
needtoknow Offline OP
OP Offline
N
Joined: Jan 2011
Posts: 4
Not a drive by smile
I will report back... but it is originally an excel file

Re: "Simple" script needed for MS Excel 2008 [Re: needtoknow] #548844 01/08/11 03:59 PM
Joined: Apr 2002
Posts: 15,080
Reboot Online Content
Muhahahaha
Online Content
Muhahahaha
Joined: Apr 2002
Posts: 15,080
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.

Re: "Simple" script needed for MS Excel 2008 [Re: Reboot] #548917 01/09/11 09:53 PM
Joined: Jan 2011
Posts: 4
N
needtoknow Offline OP
OP Offline
N
Joined: Jan 2011
Posts: 4
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.

Re: "Simple" script needed for MS Excel 2008 [Re: needtoknow] #548925 01/09/11 11:20 PM
Joined: Jan 2011
Posts: 4
N
needtoknow Offline OP
OP Offline
N
Joined: Jan 2011
Posts: 4
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.)


Moderated by  Acumowchek, MacGizmo, Reboot