+ Reply to Thread
Results 1 to 4 of 4

Read multi-line text from merged cells

  1. #1
    Registered User
    Join Date
    09-10-2020
    Location
    USA
    MS-Off Ver
    365
    Posts
    3

    Question Read multi-line text from merged cells

    Hi all,
    So I made a tool that generates Motor Control Center (MCC) layouts from a motor list. In case you don't know what that is, it is essentially a tall narrow metal box with more variable size boxes (all the same width) inside of it. inside the smaller boxes (buckets) are electronics that control motors. Since the boxes can be variable heights I did use merged cells to represent them and found that works very nicely. In the image below you can see 1 MCC with 5 tall narrow metal boxes (sections) mentioned above stacked side by side sharing a single power feed.
    AutogenMCC.jpg
    Anyways on to my question, my VBA code generates the boxes the correct size and fills in the correct data from the motorlist, but now I want to add an alternate function to take a manually drawn MCC in the same spreadsheet (and following the same format) and fill in an empty motor list on another tab. I have learned that I can use the split function with a chr(10) delimiter to break the multi-line text in each bucket into variables to later be output to the imported motor list, but i'm having trouble with the merged cells especially since they can be anywhere from 1 to 12 cells. Does anyone have any recommendations on a good way to go about this? i refuse to show up without at least some code, so here is my test code that I'm currently work on.

    Please Login or Register  to view this content.
    PS I've only been working with VBA for a few weeks now so please forgive any shortcomings.

    Thank you

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,572

    Re: Read multi-line text from merged cells

    (How to) Upload a Workbook directly to the Forum
    (please do not post pictures or links to worksheets)
    • Click Advanced next to "Post Quick Reply" button at the bottom right of the editor box.
    • Scroll down until you see "Manage Attachments",
    • Click the "Choose" button at the upper left (upload from your computer).
    • Select your file, click "open", click "upload"
    • Once the upload is completed the file name will appear below the input boxes in this window.
    • Close the Attachment Manager window.
    • Click "Submit Reply"
    Note: Please do not attach password protected workbooks/worksheets
    Ensure to disable any Workbook Open/Autorun macros before attaching!
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    09-10-2020
    Location
    USA
    MS-Off Ver
    365
    Posts
    3

    Re: Read multi-line text from merged cells

    Unfortunately I Can't upload the full macro enabled workbook, too much customer information. however i can upload an example snipit in xlsx form.
    Attached Files Attached Files
    Last edited by IBBLITZED; 09-10-2020 at 03:28 PM. Reason: Grammatical fix

  4. #4
    Registered User
    Join Date
    09-10-2020
    Location
    USA
    MS-Off Ver
    365
    Posts
    3

    Re: Read multi-line text from merged cells

    Figured it out. Ended up going with a Do While loop and manually indexing thru row and columns
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 14
    Last Post: 12-31-2023, 01:53 AM
  2. Replies: 1
    Last Post: 09-04-2015, 04:48 AM
  3. [SOLVED] Odd behaviour in CRLF Code using cells with multi-line text
    By Rhudi in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-19-2013, 04:41 PM
  4. Replies: 1
    Last Post: 06-18-2006, 11:25 AM
  5. Replies: 1
    Last Post: 10-14-2005, 10:05 AM
  6. Inserting line breaks into merged text cells.
    By MrSafetyNeedshelp in forum Excel General
    Replies: 1
    Last Post: 08-11-2005, 06:05 PM
  7. Replies: 3
    Last Post: 07-09-2005, 05:05 AM

Tags for this Thread

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