Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 40
Default SUBSTITUTE patterns?

I want to extract the worksheet name from cell("filename"). McGimpsey
has pointed me to
http://www.mcgimpsey.com/excel/formu..._function.html . (Thank
you very much.) That contains the following formula:

=MID(CELL("filename",A1), FIND("]", CELL("filename", A1))+ 1, 255)

That works just fine, of course. But I thought it would be "nicer" if
something like the following could be made to work:

=substitute(cell("filename",A1), "*]", "")

where "*]" is intended to mean "any number of characters up to and
including ]". Of course, that does not work as I intended.

Now, if there were an easier way, I'm sure McGimpsey would have thought
of it. But since SEARCH() has pattern-matching ability, I wondered if
perhaps I was overlooking something.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default SUBSTITUTE patterns?

SUBSTITUTE() doesn't use wildcards. If F20 contains:
abc*der
then
=SUBSTITUTE(F20,"*","")
returns:
abcder

--
Gary's Student


" wrote:

I want to extract the worksheet name from cell("filename"). McGimpsey
has pointed me to
http://www.mcgimpsey.com/excel/formu..._function.html . (Thank
you very much.) That contains the following formula:

=MID(CELL("filename",A1), FIND("]", CELL("filename", A1))+ 1, 255)

That works just fine, of course. But I thought it would be "nicer" if
something like the following could be made to work:

=substitute(cell("filename",A1), "*]", "")

where "*]" is intended to mean "any number of characters up to and
including ]". Of course, that does not work as I intended.

Now, if there were an easier way, I'm sure McGimpsey would have thought
of it. But since SEARCH() has pattern-matching ability, I wondered if
perhaps I was overlooking something.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 40
Default SUBSTITUTE patterns?

Gary''s Student wrote:
SUBSTITUTE() doesn't use wildcards. If F20 contains:
abc*der then =SUBSTITUTE(F20,"*","") returns: abcder


Of course I knew that. I wrote: "Of course, that does not work as I
intended." I hope my inquiry does not end with GS's comments. My
question was __not__ "does SUBSTITUTE allow wildcards". My question
was: is there __any_way__ to substitute patterns? (Other than the
MID/FIND combination that McGimpsey uses.)

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default SUBSTITUTE patterns?

checkout:

http://groups.google.com/group/micro...1f6ca30cbeee06


--
Gary's Student
gsnu200701


" wrote:

Gary''s Student wrote:
SUBSTITUTE() doesn't use wildcards. If F20 contains:
abc*der then =SUBSTITUTE(F20,"*","") returns: abcder


Of course I knew that. I wrote: "Of course, that does not work as I
intended." I hope my inquiry does not end with GS's comments. My
question was __not__ "does SUBSTITUTE allow wildcards". My question
was: is there __any_way__ to substitute patterns? (Other than the
MID/FIND combination that McGimpsey uses.)


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Stolen Patterns Ed W Excel Discussion (Misc queries) 2 September 21st 06 12:00 AM
SUBSTITUTE (more than one in Excel ?) Andy100 New Users to Excel 6 September 7th 05 06:20 AM
can I customize cell fill patterns in Excel? bghough Excel Discussion (Misc queries) 0 March 10th 05 06:09 PM
Excel cell patterns gisconsultant Excel Discussion (Misc queries) 0 February 21st 05 10:31 AM
Copying spreadsheet with fonts and patterns RTP Excel Discussion (Misc queries) 3 December 9th 04 11:49 PM


All times are GMT +1. The time now is 12:12 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"