0

So there's a list down a column that has usernames. Example: user 1, user 2, user 3, etc. The column next to it has a repeated line.. something like "\computer name\C\" and I need to add the username from the column to the left in between \ and " and C. There's also 2 other spots that the username needs to be added in this line. The long way is to copy and paste but i'd rather not go through 370 usernames doing that. Any function i can use?

2 Answers 2

0

Try following =CONCATENATE("\",H50,"\",I50,"\")

Here H50 and I50 is the column from which you want to get the values.

Scenario:

enter image description here

0

Quick solution following your structure, assuming your users data starts on A1 downwards and the computer names are on B1 downwards:

=CONCATENATE(LEFT(B1,FIND("\",B1, 2)),A1,RIGHT(B1, LEN(B1)-FIND("\",B1,2)))

Which does:

LEFT(B1,FIND("\",B1, 2))

Finds the second \ to get the string "\computer name\"

RIGHT(B1, LEN(B1)-FIND("\",B1,2))

Finds the text after the second \, in your example case "C\". After this, the function concatenates the first part with the column containing user names and the second part.

Not the answer you're looking for? Browse other questions tagged or ask your own question.