replace sub string with conditions vba : hoping you can help me out with a bit of vba code i cant seem to make work.  been using stackoverflow to help me create some simple macros but this one is a bit more complicated and i suck


the goal is to search thru a excel file with strings in column A and replace a part of a string if a couple of conditions exist.


logically: if NAME and CODE(A) or CODE(B) exist in string then replace NAME


example: NAME = child1in  CODE(A) = csus  CODE(B) = mfus

-  note: there are several names that need to be replaced but the codes are the same
TIA!

here is my code:
________________________


    `Sub replacement_TEST()

    Dim rows As Integer
    Dim cellvalue As String
    Dim Newcellvalue As String
    rows = ActiveSheet.UsedRange.rows.Count
    For i = 1 To rows
    cellvalue = ActiveSheet.Cells(i, 1).value


    eqcode = "csus"
    acct1 = "child1in"


    If acct1 = "child1in" And (eqcode = "csus" Or eqcode = "mfus") Then
    Newcellvalue = Replace(cellvalue, "child1in", "child1")
    ElseIf acct1 = "wstre2in" And (eqcode = "csus" Or eqcode = "mfus") Then
    Newcellvalue = Replace(Newcellvalue, "wstre2in", "wstre2lv")
    ElseIf acct1 = "wstrebin" And (eqcode = "csus" Or eqcode = "mfus") Then
    Newcellvalue = Replace(Newcellvalue, "wstrebin", "wstrebal")
    ElseIf acct1 = "lrcfbag" And (eqcode = "csus" Or eqcode = "mfus") Then
    Newcellvalue = Replace(Newcellvalue, "lrcfbag", "lrcfbal")
    ElseIf acct1 = "wstpsbst" And (eqcode = "csus" Or eqcode = "mfus") Then
    Newcellvalue = Replace(Newcellvalue, "wstpsbst", "wstpsbal"
    End If
    End If

    End Sub`