#1
|
|||
|
|||
Adding additional "\" to directory path name
Anyone out there know how to add an additional "\" to a directory path name using a formula?
I am pulling down the current directory path using the =cell("filename",a1) formula. I would like to take this directory path and add an additional "\" to each one in the path name. For example, i want to take a directory like: C:\desktop\folder name\folder name 2\folder name 3 and make it read as : C:\\desktop\\folder name\\folder name 2\\ folder name 3 I was able to add an additional "\" after the first one only using a REPLACE(g6,find("\",g6),1,"\\"). However, this only takes care of the first "\" and I am not sure how to change the remaining "\"s. Is there anyway to do this without getting into VBA code? Much appreciated! |
#2
|
||||
|
||||
Isn't there an argument you can supply to the REPLACE function that does it to all occurrences, not just the first one? Let's see.... Nope, guess I just dreamt that. No, wait a minute, here it is; use SUBSTITUTE instead.
SUBSTITUTE(text, old_text, new_text, [instance_num])The SUBSTITUTE function syntax has the following arguments:
|
Tags |
directory name replace, find |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
"Save as picture" not offering directory | eNGiNe | Drawing and Graphics | 3 | 02-26-2013 01:48 AM |
How to edit the "Format" and the "show level" of an EXISTING table of content? | Jamal NUMAN | Word | 2 | 08-14-2011 10:46 AM |
How to choose a "List" for certain "Heading" from "Modify" tool? | Jamal NUMAN | Word | 2 | 07-03-2011 03:11 AM |
"Microsoft Excel Application" missing in the "Component Services" on win08 | sword.fish | Excel | 0 | 02-26-2010 02:09 PM |
word 2002 adding "delete" to drop down | 2402RUNE | Word | 1 | 12-07-2008 09:29 AM |