+ Reply to Thread
Results 1 to 10 of 10

Trouble with a function

Hybrid View

  1. #1
    Registered User
    Join Date
    04-21-2009
    Location
    Oklahoma City
    MS-Off Ver
    Excel 2008 for Mac
    Posts
    5

    Re: Trouble with a function

    Thank you so much! I really really really appreciate it.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Trouble with a function

    Hello sperl,

    I sent the him a private message about your problem. Hopefully you will hear back from him today.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    04-21-2009
    Location
    Oklahoma City
    MS-Off Ver
    Excel 2008 for Mac
    Posts
    5

    Re: Trouble with a function

    Thanks again!

  4. #4
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Trouble with a function

    I still working on the Apple Script for this.

    But since its a one time thing, you might try (if your poorly formatted data is in column A)
    Put =SUBSTITUTE(A1,CHAR(13),",") in B1. (Your boss is mistaken, the linefeed (for Mac) is CHAR(13) not CHAR(10))
    and drag down. Then Copy PasteSpecialValues to change it from formulas to values. Then you can use text to columns (comma delimited) to split out the columns.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  5. #5
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Trouble with a function

    Got It! The problem was to Get Value of bRange.

    Open Script Editor and paste this into a new window.
    tell application "Microsoft Excel"
    	set ARange to range "A1" of sheet "Sheet1" of workbook "Workbook1.xls"
    	set ARange to get resize current region of ARange column size 1
    	set bRange to (get offset of ARange column offset 1)
    	
    	set formula of bRange to "=substitute(RC[-1],CHAR(13),CHAR(44))"
    	
    	set value of bRange to get value of bRange
    	
    	set display alerts to false
    	text to columns bRange data type delimited with comma
    	set display alerts to true
    	
    	delete range ARange shift shift to left
    end tell
    Run the script and the excel file should be converted.
    BTW, if you need more help with Excel 2008/AppleScript, you could PM me.
    If you need help with AppleScript, http://macscripter.net/index.php has been very helpful to me.
    Last edited by mikerickson; 04-23-2009 at 03:09 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1