REPLACE(S1, N1, N2, S2)

Top  Previous  Next

 

Description

This function returns the string formed by replacing the N2 characters starting at position N1 in string S1 with string S2.

 

Parameters

 

S1

A string value.

 

N1

A numeric value.

 

N2

A numeric value.

 

S2

A string value.

 

Examples

 

REPLACE("John", 1, 3, "ack") = "Jack"

 

REPLACE(E1, 8, 3, "Log") = "Expense Logort"

Where E1 = "Expense Report"

 

REPLACE(E1, 8, 6, "Log") = "Expense Log"

Where E1 = "Expense Report"

 

REPLACE("ABC", 0, 0, "XYZ") = "XYZABC"

 

Sponsored

Try Predictive Systems Lab

Interactive Demo →

Need Help?
Contact support