A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Replace with wildcards



 
 
Thread Tools Display Modes
  #1  
Old November 11th, 2009, 04:22 AM posted to microsoft.public.excel.misc
pda
external usenet poster
 
Posts: 4
Default Replace with wildcards

How do I replace is a list of dates such as "1999" with sp1999 using the
wildcare "*"? When I use the wildcard "*" and try to replace * with sp* the
result is "sp*" instead of the desired "sp1999"

Excell finds 1999 ok using *, but the replacement doesn't work right.

Thanks,

  #2  
Old November 11th, 2009, 02:18 PM posted to microsoft.public.excel.misc
Dave Peterson
external usenet poster
 
Posts: 19,791
Default Replace with wildcards

Depending on the number of entries you have to replace, maybe you could do each
explicitly.

1999
becoms
sp1999

2000
becomes
sp2000

Or maybe you could use a helper column and a formula like:
="sp" & a1
or
="sp" & year(a1)
(if a1 really contains a date)

PDA wrote:

How do I replace is a list of dates such as "1999" with sp1999 using the
wildcare "*"? When I use the wildcard "*" and try to replace * with sp* the
result is "sp*" instead of the desired "sp1999"

Excell finds 1999 ok using *, but the replacement doesn't work right.

Thanks,


--

Dave Peterson
  #3  
Old November 11th, 2009, 02:20 PM posted to microsoft.public.excel.misc
Dave Peterson
external usenet poster
 
Posts: 19,791
Default Replace with wildcards

Or even use a custom format (the value doesn't change) of:
mm/dd/\s\pyyyy

or that custom format in a formula in another cell:
=text(a1,"mm/dd/\s\pyyyy")



PDA wrote:

How do I replace is a list of dates such as "1999" with sp1999 using the
wildcare "*"? When I use the wildcard "*" and try to replace * with sp* the
result is "sp*" instead of the desired "sp1999"

Excell finds 1999 ok using *, but the replacement doesn't work right.

Thanks,


--

Dave Peterson
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


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


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