+ Reply to Thread
Results 1 to 8 of 8

Split merged cells from Infopath - Sharepoint

Hybrid View

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

    Re: Split merged cells from Infopath - Sharepoint

    Option Explicit
    Sub Splitter()
        Dim TestRange   As Range, _
            TestCell    As Range, _
            Holder      As Variant, _
            LstCol      As Long
    
        LstCol = Cells(1, Columns.Count).End(xlToLeft).Column
        Set TestRange = Range("A2", Cells(2, LstCol))
        
        For Each TestCell In TestRange
            If TestCell.Value <> "" Then
                Holder = Split(TestCell.Value, Chr(10))
                Select Case UBound(Holder)
                    Case 0
                        TestCell.Offset(2, 0).Value = TestCell.Value
                    Case Else
                        TestCell.Offset(2, 0).Resize(rowsize:=UBound(Holder) + 1).Value = Application.Transpose(Holder)
                End Select
            End If 'not blank
        Next TestCell
    End Sub
    Attached Files Attached Files
    Ben Van Johnson

  2. #2
    Registered User
    Join Date
    06-09-2014
    Posts
    3

    Re: Split merged cells from Infopath - Sharepoint

    Thank you very much protonLeah! That's amazing!

    This really safistifies my needs, but I'm gonna ask you something else if you could help me. Is it possible to just order the values in the same table instead of copying the values down there? That would be the perfect solution!

    Anyway thank you for reading and for you help!

    fer22.

+ 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. Get data from split/merged cells
    By garymrowe in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-06-2013, 10:53 PM
  2. Replies: 1
    Last Post: 06-28-2012, 11:53 AM
  3. Excel 2007 : Sorting data that is split with merged cells
    By WaldoBurger in forum Excel General
    Replies: 3
    Last Post: 04-07-2010, 08:02 AM
  4. Split merged cells and distribute contents
    By eugene w in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-03-2009, 08:09 PM
  5. Email, forms, Excel, Infopath, Sharepoint
    By Bettergains in forum Excel General
    Replies: 0
    Last Post: 11-10-2005, 06:30 PM

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