Forum Discussion
How do I put one cells values in front of existing numbers?
- Apr 12, 2023
Another way to replace the “BR” values in column C with the branch code entered in cell H3 while keeping the numbers to the right of “BR” is to use a formula that combines the SUBSTITUTE and CONCATENATE functions. Here’s an example formula that you could enter in cell D3 and then copy down to cells D4:D15:
=SUBSTITUTE(C3,"BR",CONCATENATE(H3,""))
This formula uses the SUBSTITUTE function to replace any occurrences of “BR” in cell C3 with the value entered in cell H3. The CONCATENATE function is used to convert the value in cell H3 to a string so that it can be used as the replacement text in the SUBSTITUTE function.
After entering this formula in cell D3 and copying it down to cells D4:D15, column D will contain the updated coding values with the branch code from cell H3 replacing any occurrences of “BR” in column C.
The simple and quick way is what Mr. Riny_van_Eekelen has already suggested. =H3&"0004216"
I hope this helps!
Another way to replace the “BR” values in column C with the branch code entered in cell H3 while keeping the numbers to the right of “BR” is to use a formula that combines the SUBSTITUTE and CONCATENATE functions. Here’s an example formula that you could enter in cell D3 and then copy down to cells D4:D15:
=SUBSTITUTE(C3,"BR",CONCATENATE(H3,""))
This formula uses the SUBSTITUTE function to replace any occurrences of “BR” in cell C3 with the value entered in cell H3. The CONCATENATE function is used to convert the value in cell H3 to a string so that it can be used as the replacement text in the SUBSTITUTE function.
After entering this formula in cell D3 and copying it down to cells D4:D15, column D will contain the updated coding values with the branch code from cell H3 replacing any occurrences of “BR” in column C.
The simple and quick way is what Mr. Riny_van_Eekelen has already suggested. =H3&"0004216"
I hope this helps!