+ Reply to Thread
Results 1 to 10 of 10

Problem in Merging Information

Hybrid View

323100N Problem in Merging Information 10-09-2017, 11:16 AM
Richard Buttrey Re: Problem in Merging... 10-09-2017, 12:35 PM
323100N Re: Problem in Merging... 10-10-2017, 02:56 AM
Richard Buttrey Re: Problem in Merging... 10-10-2017, 04:10 AM
323100N Re: Problem in Merging... 10-10-2017, 06:58 AM
jaslake Re: Problem in Merging... 10-10-2017, 05:39 PM
Richard Buttrey Re: Problem in Merging... 10-11-2017, 05:22 AM
323100N Re: Problem in Merging... 10-11-2017, 05:40 AM
323100N Re: Problem in Merging... 10-11-2017, 05:47 AM
jaslake Re: Problem in Merging... 10-11-2017, 10:33 AM
  1. #1
    Forum Contributor 323100N's Avatar
    Join Date
    08-11-2017
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    272

    Problem in Merging Information

    Hi,

    I'm not sure if this is possible, because I have a working file where in I have a sheet for RAW Data (Information from PDF), then once I click the button It will merge the specific data in Result Tab.

    The problem here that details is not constant. Usually when I paste the information the Customer Name is located in ODD number of cell. I also included Legends for the location of the information that I need to capture.

    Please see attached file for references.

    I hope can someone help me with this project
    Attached Files Attached Files
    Last edited by 323100N; 10-09-2017 at 11:33 AM.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Problem in Merging Information

    Quote Originally Posted by 323100N View Post
    Hi,

    Usually when I paste the information the Customer Name is located in ODD number of cell.
    Excel doesn't really like usually, it prefers certainty.

    What does the data look like when it's NOT in an odd numbered row? Please give us some examples perhaps with even numbered company rows in the middle of your data. Show various permutations. i.e. companies in :

    alternating odd/even rows
    Several odd blocks followed by several even blocks
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Contributor 323100N's Avatar
    Join Date
    08-11-2017
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    272

    Re: Problem in Merging Information

    Thanks for the inputs, actually those information is from a PDF file our Manager need those information in excel so what we did we copy and paste the information, and that was it looks like when we paste it to excel. That's the only look like when we paste the information its fix in odd # and the rest of the information is in the even cell. Thank you.

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Problem in Merging Information

    Please read my question and answer the specific points I asked.

    Your example showed only stuff on odd rows. We (I) need to see stuff that's also on even rows and also understand whether you can have several successive rows of even rows stuff and then several odd numbered rows of stuff and whether the mixture of odd/even rows is random or whether there is any consistency.

  5. #5
    Forum Contributor 323100N's Avatar
    Join Date
    08-11-2017
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    272

    Re: Problem in Merging Information

    Hi Sir,

    Sorry to confuse you. Please see response below.

    What does the data look like when it's NOT in an odd numbered row? - It's fixed no matter where the user gets the information the Customer Name will be always fall in an odd numbered row.

    Please give us some examples perhaps with even numbered company rows in the middle of your data. - N/A for even numbered rows, it will always ODD numbered row., but the dilema here sometimes the Customer or Company name reach until Row F depending how long is the Company name.

    Attached is the additional information. The possible result is under the Result Tab.
    Attached Files Attached Files

  6. #6
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Problem in Merging Information

    Hi 323100N

    This is as close as I can come to your desired Results. This Code has been assigned to your Button...
    Option Explicit
    Sub Test()
        Dim ws As Worksheet
        Dim ws1 As Worksheet
        Dim Rng As Range
        Dim LR As Long
        Dim LR1 As Long
        Dim i As Long
    
        Application.ScreenUpdating = False
        Set ws = Sheets("RAW Data")
        Set ws1 = Sheets("Result")
    
        With ws1
            .UsedRange.Offset(1, 0).ClearContents
        End With
    
        With ws
            LR = .Range("A" & .Rows.Count).End(xlUp).Row
            Set Rng = .Range(.Cells(2, "A"), .Cells(LR, "A"))
    
            For i = 3 To LR Step 2
                With ws1
                    LR1 = .Range("A" & .Rows.Count).End(xlUp).Row + 1
    
                    If (IsNumeric(ws.Cells(i, "D").Value)) Then
                        .Range("A" & LR1).Value = ws.Cells(i, "A").Value & " " & ws.Cells(i, "B").Value & " " & ws.Cells(i, "C").Value & " "
                        .Range("B" & LR1).Value = ws.Cells(i - 1, "C").Value
                        .Range("C" & LR1).Value = ws.Cells(i - 1, "D").Value
                    Else
                        .Range("A" & LR1).Value = ws.Cells(i, "A").Value & " " & ws.Cells(i, "B").Value & " " & ws.Cells(i, "C").Value & " " & ws.Cells(i, "D").Value
                        .Range("B" & LR1).Value = ws.Cells(i - 1, "C").Value
                        .Range("C" & LR1).Value = ws.Cells(i - 1, "D").Value
                    End If
                End With
            Next i
        End With
    
        Application.ScreenUpdating = True
    End Sub
    Attached Files Attached Files
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  7. #7
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Problem in Merging Information

    Here's a non macro way in a cell on row 2 copied down

    Formula: copy to clipboard
    =OFFSET($A$1,ROW()*2-2,0)&" "&IF(ISNUMBER(OFFSET($B$1,ROW()*2-2,0)),"",OFFSET($B$1,ROW()*2-2,0))&" "&IF(ISNUMBER(OFFSET($C$1,ROW()*2-2,0)),"",OFFSET($C$1,ROW()*2-2,0))&" "&IF(ISNUMBER(OFFSET($D$1,ROW()*2-2,0)),"",OFFSET($D$1,ROW()*2-2,0))


    This will return the whole vendor name
    For the account and amount use the same formula but change the $A$1 ref to $B$1 7 $C$1

  8. #8
    Forum Contributor 323100N's Avatar
    Join Date
    08-11-2017
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    272

    Re: Problem in Merging Information

    Thank you jaslake, this works well

  9. #9
    Forum Contributor 323100N's Avatar
    Join Date
    08-11-2017
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    272

    Re: Problem in Merging Information

    Thank you both of you Richard and jaslake it works fine with me either of the code.

  10. #10
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Problem in Merging Information

    You're welcome...glad I could help. Thanks for the Rep.

+ 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. [SOLVED] Merging information based on criteria
    By Knut Kvinnsland in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-01-2014, 04:51 AM
  2. Need assistance merging information
    By jwbeaty in forum Excel General
    Replies: 2
    Last Post: 07-23-2009, 04:10 PM
  3. Merging two columns of information
    By Cjax in forum Excel General
    Replies: 7
    Last Post: 07-17-2009, 10:32 AM
  4. Merging Rows with similar information.
    By sayhelloIrl in forum Excel General
    Replies: 3
    Last Post: 01-01-2009, 12:27 PM
  5. Merging two columns of information
    By cort_2_pint in forum Excel General
    Replies: 1
    Last Post: 08-20-2007, 06:55 PM
  6. [SOLVED] When merging information not merging correctly
    By Bridgett in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 12-09-2005, 06:15 PM
  7. merging text information
    By danielle in forum Excel General
    Replies: 1
    Last Post: 06-13-2005, 10:05 AM

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