I am trying to count characters between 2 "-"'s and another between a "-" and " " in a string. For example, the formula on "B-213-01 " should return 3 for the first part and returns 2 for the second.
Regards,
Last edited by ashraf999; 01-28-2012 at 03:29 AM.
Hi ashraf999
to count between the -'s
=LEN(TRIM(MID(SUBSTITUTE(B3,"-",REPT(" ",100)),100,100)))
regards pike
If the solution helped please donate here to the RSPCA
Sites worth visiting;
J&R Solutions - royUK
AJP Excel Information - Andy Pope
Spreadsheet Toolbox
VBA for smarties - snb
ops the second part
=LEN(TRIM(RIGHT(SUBSTITUTE(B3,"-",REPT(" ",100)),100)))
regards pike
If the solution helped please donate here to the RSPCA
Sites worth visiting;
J&R Solutions - royUK
AJP Excel Information - Andy Pope
Spreadsheet Toolbox
VBA for smarties - snb
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks