none
FIND THE MATCHING TEXT AND PASTE TO CELL RRS feed

  • Question

  • Hi Team,

    AS PER ABOVE IMAGE I WANT FIND MENTION NAME LIKE  "Sheet-41133" AND AND LOOKING FOR OTHER CELL "C" FOR RELATED NAME AND PASTE IT CELL "B1"  AND PROCEDURE FOLLOWS FOR OTHER CELLS ALSO.

    THIS IS VERY IMPORTANT TO ME PLEAS IM EQUESTING U ALL TO SOLOVE MY PROBLEM

    THANKS & REGARDS

    VINAY

    Friday, July 10, 2015 10:08 AM

Answers

  • Hi,

    >> AS PER ABOVE IMAGE I WANT FIND MENTION NAME LIKE  "Sheet-41133" AND AND LOOKING FOR OTHER CELL "C" FOR RELATED NAME AND PASTE IT CELL "B1"  AND PROCEDURE FOLLOWS FOR OTHER CELLS ALSO.

    Are you going to get the sheet name in Column B, then find it in Column D , if it is found, copy the cell value of D  to Column C? If I am understanding correctly, suppose only one record could be found in column D, you may follow the below code, then adapt and apply it in your project.

    Sub GetMatchedValue() Dim StrArray() As String Dim str As String Dim c As Object For i = 1 To Sheets(1).UsedRange.Rows.Count If IsEmpty(Cells(i, 1)) = False Then StrArray = Split(Cells(i, 1).Value, "-") str = StrArray(4) ' Get the value for Sheet Sheets(1).Range("D:D").Select Set c = Selection.Find(What:=str, After:=ActiveCell, LookIn:=xlFormulas, _ LookAt:=xlPart) If Not (c Is Nothing) Then

    ' copy the value from Column D to Column C Cells(i, 1).Offset(0, 2).Value = c.Value End If End If Next i End Sub


    And, this is the sample that you can download it. http://1drv.ms/1Mp1yKw 

    Hope this could help you.

    Best Regards,

    Lan


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by L.HlModerator Saturday, July 18, 2015 9:32 AM
    Monday, July 13, 2015 4:42 AM
    Moderator

All replies

  • AS PER ABOVE IMAGE I WANT FIND MENTION NAME LIKE  "Sheet-41133" AND AND LOOKING FOR OTHER CELL "D" FOR RELATED NAME AND PASTE IT CELL "C1"  AND PROCEDURE FOLLOWS FOR OTHER CELLS ALSO.
    Friday, July 10, 2015 10:09 AM
  • Hi,

    >> AS PER ABOVE IMAGE I WANT FIND MENTION NAME LIKE  "Sheet-41133" AND AND LOOKING FOR OTHER CELL "C" FOR RELATED NAME AND PASTE IT CELL "B1"  AND PROCEDURE FOLLOWS FOR OTHER CELLS ALSO.

    Are you going to get the sheet name in Column B, then find it in Column D , if it is found, copy the cell value of D  to Column C? If I am understanding correctly, suppose only one record could be found in column D, you may follow the below code, then adapt and apply it in your project.

    Sub GetMatchedValue() Dim StrArray() As String Dim str As String Dim c As Object For i = 1 To Sheets(1).UsedRange.Rows.Count If IsEmpty(Cells(i, 1)) = False Then StrArray = Split(Cells(i, 1).Value, "-") str = StrArray(4) ' Get the value for Sheet Sheets(1).Range("D:D").Select Set c = Selection.Find(What:=str, After:=ActiveCell, LookIn:=xlFormulas, _ LookAt:=xlPart) If Not (c Is Nothing) Then

    ' copy the value from Column D to Column C Cells(i, 1).Offset(0, 2).Value = c.Value End If End If Next i End Sub


    And, this is the sample that you can download it. http://1drv.ms/1Mp1yKw 

    Hope this could help you.

    Best Regards,

    Lan


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by L.HlModerator Saturday, July 18, 2015 9:32 AM
    Monday, July 13, 2015 4:42 AM
    Moderator