taurean
Well-known Member
- Joined
- Jun 17, 2011
- Messages
- 2,190
- Office Version
- 365
- 2016
- Platform
- Windows
Hi,
Background:
I have been visiting mrexcel forum for improving my formula writing skills. And this forum and the guys on this forum are absolutely fantastic . Apart from this, I have a small group of office-mates who are like minded in this endeavor. Any one of us creates an academic problem (for which we try out formula based solutions.
Problem:
Following is one of those cases:
The task is: replacing the last "-" character with "\"
Above formulas (especially SUBSTITUTE for its flexibility) work nicely however I'd like to get some more advice regarding following:
Request:
The REPLACE formula is a bit of a mess (for me at least as I wrote it). Here are the things I'd like to have advice on:
1. What are the other ways (Formula Based) to get above results?
2. Is there any way that we can auto generate ARRAY CONSTANTS from 1 to LEN(A2) like {1:LEN(A2} instead of hard coding them?
3. Is there anyway we can REVERSE the string as that will make FIND work?
And we all have same config. at office Excel 2007 and OS: XP
Background:
I have been visiting mrexcel forum for improving my formula writing skills. And this forum and the guys on this forum are absolutely fantastic . Apart from this, I have a small group of office-mates who are like minded in this endeavor. Any one of us creates an academic problem (for which we try out formula based solutions.
Problem:
Following is one of those cases:
Excel Workbook | |||||
---|---|---|---|---|---|
A | B | C | |||
1 | Raw Data | Expected Result | Formula | ||
2 | ab-cd-e-f-gh-cd | ab-cd-e-f-gh\cd | ab-cd-e-f-gh\cd | ||
3 | bb-cde-gh | bb-cde\gh | bb-cde\gh | ||
4 | c-d-e-ffff-g | c-d-e-ffff\g | |||
5 | e-f-g | e-f\g | |||
6 | cdef-ghjk-lef | cdef-ghjk\lef | |||
Sheet1 |
The task is: replacing the last "-" character with "\"
Above formulas (especially SUBSTITUTE for its flexibility) work nicely however I'd like to get some more advice regarding following:
Request:
The REPLACE formula is a bit of a mess (for me at least as I wrote it). Here are the things I'd like to have advice on:
1. What are the other ways (Formula Based) to get above results?
2. Is there any way that we can auto generate ARRAY CONSTANTS from 1 to LEN(A2) like {1:LEN(A2} instead of hard coding them?
3. Is there anyway we can REVERSE the string as that will make FIND work?
And we all have same config. at office Excel 2007 and OS: XP
Last edited: