How I can find string in excel with vba?

Excel in vba - find and replace

  • I want to replace string i value to k value, but i got type mismatch error i unable to find the solution plz help me. Here Code Sub FINDREPLACE() Dim target, cell As Range Dim i(0 To 6) As String i(0) = "Happy Birthday" i(1) = "Happy rajesh" i(2) = "Happy siva" i(3) = "Happy rupy" i(4) = "Happy krishna" i(5) = "Happy murugan" Dim k(0 To 6) As String k(0) = "change Birthday" k(1) = "change rajesh" k(2) = "change siva" k(3) = "change rupy" k(4) = "change krishna" k(5) = "change murugan" Set target = Sheets("sheet2").Range(Range("A1"), Range("XFD1").End(xlUp)) For Each cell In target If cell.Value = i Then cell.Value = k Next cell End Sub Thanks for your help Sivakumar

  • Answer:

    Sivakumar Sorry I am not a VBA expert--I suggest you reask the question of another allexperts person and check the resumes for those that are expert in VBA, I'm sure you can find someone who can give you a good answer. Sorry I coudln't be of more help

Miningco.com Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.