whitoulias
Board Regular
- Joined
- Jun 22, 2012
- Messages
- 153
Hi all,
I have created a macro which reads column B and then creates separate sheets based on the values-text found on that Column.
I obviously get an error while new sheets are created. The 1st one is when text is over 31 characters. This is resolved.
The 2nd one is when i have the 7 sin characters (/, \, *, [, ], ? , :, ) and sheet name cannot be created.
Ideally i would like to have the below code like 7 times, each for every character, but this doesn't work.
Range("B2:B" & lastRow(ActiveSheet)).Select
Selection.Replace What:="/", Replacement:="_", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False
Any thought would be appreciated.
Thank you
I have created a macro which reads column B and then creates separate sheets based on the values-text found on that Column.
I obviously get an error while new sheets are created. The 1st one is when text is over 31 characters. This is resolved.
The 2nd one is when i have the 7 sin characters (/, \, *, [, ], ? , :, ) and sheet name cannot be created.
Ideally i would like to have the below code like 7 times, each for every character, but this doesn't work.
Range("B2:B" & lastRow(ActiveSheet)).Select
Selection.Replace What:="/", Replacement:="_", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False
Any thought would be appreciated.
Thank you
Last edited: