Posts by jolivanes

    Any columns from the first column past row 3 having a value of "RRP" to the last used column in your data range minus 1 (Count Column)

    If you delete the "Count" Column, change the code to reflect that.

    In the "n = WorksheetFunction....." line, change the "lc - 1" to "lc"

    Add some extra Columns for sizes to try it out.

    Maybe

    Looking at it again, you might want to replace

    Code
    .Offset(, 1).Value = Left(a, 9) & Mid(a, 11, 5)

    with

    Code
    .Offset(, 1).Value = Application.Replace(Mid(a, InStrRev(a, ":") + 1), InStrRev(Mid(a, InStrRev(a, ":") + 1), "."), 1, "")

    to avoid possible wrong counts, 9 and 11 in above line.

    Try this.

    It is based on your attachment that has the data in the "Raw Data" Sheet starting in Range B17 and ends at B28 (I think it is Version 3)

    The result starts at Cell A6 in "Transfer" Sheet.

    Macro to run when "Raw Data" Sheet is the Active Sheet (showing on the desktop).

    Wouldn't be a bad idea to try on a copy of your origiginal first and check the result thouroughly.

    I Don't know what you mean by this: "then pasting onto another sheet all into one row."

    The 2nd macro will paste everything into one row if that is what you want.

    Try both of them but clear the Transfer sheet after using one and before using the next code

    Both are based on what you supplied.

    Code
    Sub Maybe_So()
    Dim i As Long
    For i = 1 To Cells(Rows.Count, 1).End(xlUp).Row
    Range(Cells(i, 1), Cells(i, Rows(i).SpecialCells(2, 2).Cells(1).Column - 1)).Copy Sheets("Transfer").Cells(Rows.Count, 1).End(xlUp).Offset(1)
    Next i
    End Sub
    Code
    Sub Or_Maybe_This()
    Dim i As Long
    For i = 1 To Cells(Rows.Count, 1).End(xlUp).Row
    Range(Cells(i, 1), Cells(i, Rows(i).SpecialCells(2, 2).Cells(1).Column - 1)).Copy Sheets("Transfer").Cells(1, Sheets("Transfer").Columns.Count).End(xlToLeft).Offset(, 1)
    Next i
    End Sub

    Like royUK mentioned. Pictures don't do it.

    I just took a stab at it from what I gathered what is in the pics.


    royUK

    Yes, I was. The way it was worded gave me that impression.

    JimmyB was asked twice, in Post $3 and Post #4, to explain what he wants to achieve but never did.

    The code that was supplied in Post #6 needed the asked for explanation IMHO

    As "Mumps" mentioned, don't be shy by giving us needed information in a concise manner.

    You have to remember that you have the workbook in question in front of you while we're just taking a stab at what we think it looks like.


    For lack of pertinent info, either of these or a combination maybe.

    Code
    Sub Maybe_A()
    Dim txtArr, i As Long
    txtArr = Array("Text1", "Text2", "Text3")    '<---- List of values. Expand as required
    For i = LBound(txtArr) To UBound(txtArr)
    MsgBox Columns(5).Find(txtArr(i), , , 1).Offset(, -2).Value
    Next i
    End Sub


    Code
    Sub Maybe_B()
    Dim c As Range
    For Each c In Range("H2:H" & Cells(Rows.Count, 8).End(xlUp).Row)    '<---- List of values to be found
    Columns(5).Find(c, , , 1).Offset(, 2).Value = Columns(5).Find(c, , , 1).Offset(, -2).Value
    Next c
    End Sub

    Same first 2 sentences in Post #2 should be looked at.

    Have not tried it but I am sure you will and let us know if it works.

    Try on a copy of your original and thoroughly check result.

    It's slow but still faster than manually


    End Sub