URL strings - folder depthExcel concatenate strings from cells listed in third cellhow do i extract cells...
It doesn't matter the side you see it
3.5% Interest Student Loan or use all of my savings on Tuition?
Make me a metasequence
Why are special aircraft used for the carriers in the United States Navy?
For the Kanji 校 is the fifth stroke connected to the sixth stroke?
Would the melodic leap of the opening phrase of Mozart's K545 be considered dissonant?
Book about a time-travel war fought by computers
Was it really inappropriate to write a pull request for the company I interviewed with?
Is there a math equivalent to the conditional ternary operator?
Should we avoid writing fiction about historical events without extensive research?
What does each site of a vanilla 9.1 installation do?
What is the difference between 主菜 and 主食?
How does signal strength relate to bandwidth?
1970s scifi/horror novel where protagonist is used by a crablike creature to feed its larvae, goes mad, and is defeated by retraumatising him
Why doesn't "adolescent" take any articles in "listen to adolescent agonising"?
How to kill a localhost:8080
Caulking a corner instead of taping with joint compound?
Are small insurances worth it
Specific Chinese carabiner QA?
When to use mean vs median
Are there other characters in the Star Wars universe who had damaged bodies and needed to wear an outfit like Darth Vader?
Is there a way to find out the age of climbing ropes?
How to get the first element while continue streaming?
I can't die. Who am I?
URL strings - folder depth
Excel concatenate strings from cells listed in third cellhow do i extract cells from multiple spreadsheets all with same format into new master fileExtracting Characters from Folder Path in ExcelExcel- Merge cells with same text in one column and add time values in anotherSplit folder paths in Excel to return the final folderHow to extract a specific column from a different workbook stored in a folder using VBA?EXCEL help looking up multiple valuesExcel: Copy and drag down for specific sheet structureHow to exact folder name from an Excel cell?Excel Function/Macro to extract numbers from a comma delimited list
I have folder paths in column A which has a folder path.
First example, \SERVERNAMEFILESHARE1_Folder2_Folder3_Folder
Second example, \SERVERNAMEFILESHARE1_Folder2_Folder
I would like to extract the depth of each final folder (after the fileshare as this will always be the same) into a new column(s).
So in above first example it would show a depth of 3.
In second example it would show a depth of 2.
How is this achieved?
Thanks
microsoft-excel
New contributor
donnashim is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
I have folder paths in column A which has a folder path.
First example, \SERVERNAMEFILESHARE1_Folder2_Folder3_Folder
Second example, \SERVERNAMEFILESHARE1_Folder2_Folder
I would like to extract the depth of each final folder (after the fileshare as this will always be the same) into a new column(s).
So in above first example it would show a depth of 3.
In second example it would show a depth of 2.
How is this achieved?
Thanks
microsoft-excel
New contributor
donnashim is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Do all paths end with a backslash?
– grawity
yesterday
add a comment |
I have folder paths in column A which has a folder path.
First example, \SERVERNAMEFILESHARE1_Folder2_Folder3_Folder
Second example, \SERVERNAMEFILESHARE1_Folder2_Folder
I would like to extract the depth of each final folder (after the fileshare as this will always be the same) into a new column(s).
So in above first example it would show a depth of 3.
In second example it would show a depth of 2.
How is this achieved?
Thanks
microsoft-excel
New contributor
donnashim is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I have folder paths in column A which has a folder path.
First example, \SERVERNAMEFILESHARE1_Folder2_Folder3_Folder
Second example, \SERVERNAMEFILESHARE1_Folder2_Folder
I would like to extract the depth of each final folder (after the fileshare as this will always be the same) into a new column(s).
So in above first example it would show a depth of 3.
In second example it would show a depth of 2.
How is this achieved?
Thanks
microsoft-excel
microsoft-excel
New contributor
donnashim is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
donnashim is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
donnashim is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked yesterday
donnashimdonnashim
61
61
New contributor
donnashim is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
donnashim is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
donnashim is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Do all paths end with a backslash?
– grawity
yesterday
add a comment |
Do all paths end with a backslash?
– grawity
yesterday
Do all paths end with a backslash?
– grawity
yesterday
Do all paths end with a backslash?
– grawity
yesterday
add a comment |
1 Answer
1
active
oldest
votes
With data in column A, in B1 enter:
=LEN(A1)-LEN(SUBSTITUTE(A1,"",""))-4
and copy downward:

@donnashim yes .................... in cell B2 enter =LEN(A2)-LEN(SUBSTITUTE(A2,"",""))-4
– Gary's Student
yesterday
If the path does not always end with a or start with 2, calculate the subtraction number as needed.-3-if(right(trim(b1),1)=""),1,0)
– Ted D.
yesterday
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
donnashim is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1411465%2furl-strings-folder-depth%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
With data in column A, in B1 enter:
=LEN(A1)-LEN(SUBSTITUTE(A1,"",""))-4
and copy downward:

@donnashim yes .................... in cell B2 enter =LEN(A2)-LEN(SUBSTITUTE(A2,"",""))-4
– Gary's Student
yesterday
If the path does not always end with a or start with 2, calculate the subtraction number as needed.-3-if(right(trim(b1),1)=""),1,0)
– Ted D.
yesterday
add a comment |
With data in column A, in B1 enter:
=LEN(A1)-LEN(SUBSTITUTE(A1,"",""))-4
and copy downward:

@donnashim yes .................... in cell B2 enter =LEN(A2)-LEN(SUBSTITUTE(A2,"",""))-4
– Gary's Student
yesterday
If the path does not always end with a or start with 2, calculate the subtraction number as needed.-3-if(right(trim(b1),1)=""),1,0)
– Ted D.
yesterday
add a comment |
With data in column A, in B1 enter:
=LEN(A1)-LEN(SUBSTITUTE(A1,"",""))-4
and copy downward:

With data in column A, in B1 enter:
=LEN(A1)-LEN(SUBSTITUTE(A1,"",""))-4
and copy downward:

answered yesterday
Gary's StudentGary's Student
13.8k31730
13.8k31730
@donnashim yes .................... in cell B2 enter =LEN(A2)-LEN(SUBSTITUTE(A2,"",""))-4
– Gary's Student
yesterday
If the path does not always end with a or start with 2, calculate the subtraction number as needed.-3-if(right(trim(b1),1)=""),1,0)
– Ted D.
yesterday
add a comment |
@donnashim yes .................... in cell B2 enter =LEN(A2)-LEN(SUBSTITUTE(A2,"",""))-4
– Gary's Student
yesterday
If the path does not always end with a or start with 2, calculate the subtraction number as needed.-3-if(right(trim(b1),1)=""),1,0)
– Ted D.
yesterday
@donnashim yes .................... in cell B2 enter =LEN(A2)-LEN(SUBSTITUTE(A2,"",""))-4
– Gary's Student
yesterday
@donnashim yes .................... in cell B2 enter =LEN(A2)-LEN(SUBSTITUTE(A2,"",""))-4
– Gary's Student
yesterday
If the path does not always end with a or start with 2, calculate the subtraction number as needed.
-3-if(right(trim(b1),1)=""),1,0)– Ted D.
yesterday
If the path does not always end with a or start with 2, calculate the subtraction number as needed.
-3-if(right(trim(b1),1)=""),1,0)– Ted D.
yesterday
add a comment |
donnashim is a new contributor. Be nice, and check out our Code of Conduct.
donnashim is a new contributor. Be nice, and check out our Code of Conduct.
donnashim is a new contributor. Be nice, and check out our Code of Conduct.
donnashim is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1411465%2furl-strings-folder-depth%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Do all paths end with a backslash?
– grawity
yesterday