Hello Guys,
I m trying to get this forumla below working but i keep getting this error: Unable to get the Substitute property of the WorksheetFunction class
In excel, everything working fine with this formula:
=RIGHT(D4, LEN(D4) - FIND("@", SUBSTITUTE(D4, "-", "@", LEN(D4) - LEN(SUBSTITUTE(D4, "-", ""))), 1))
Can someone help me with this please?
Thanks.
I m trying to get this forumla below working but i keep getting this error: Unable to get the Substitute property of the WorksheetFunction class
VBA Code:
Range("M" & cell.Row).Value = Right(cell.Value, Len(cell.Value) - Application.WorksheetFunction.Find("@", Application.WorksheetFunction.Substitute(cell.Value, "-", "@", Len(cell.Value) - Len(Application.WorksheetFunction.Substitute(cell.Value, "-", ""))), 1))
In excel, everything working fine with this formula:
=RIGHT(D4, LEN(D4) - FIND("@", SUBSTITUTE(D4, "-", "@", LEN(D4) - LEN(SUBSTITUTE(D4, "-", ""))), 1))
Can someone help me with this please?
Thanks.