Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 24
Default Replace wildcard character problem

My colleague has some texts written like

*Abe
*Benzen
*Munoni
*Monintor

and so on. Now he want to change the texts to

*Abe*
*Benzen*
*Munoni*
*Monintor*

I have problems making it work because of * being a wildcard character.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,872
Default Replace wildcard character problem

Hi,

Am Mon, 28 Oct 2019 08:28:27 -0700 (PDT) schrieb Daddy Sage:

My colleague has some texts written like

*Abe
*Benzen
*Munoni
*Monintor

and so on. Now he want to change the texts to

*Abe*
*Benzen*
*Munoni*
*Monintor*


try it with a helper column. If the first string is in A1 then use:
=A1&"*"
Then copy the helper column and insert it as values in column A.

Or try:

Sub Test()
Dim LRow As Long
Dim rngC As Range

With ActiveSheet
LRow = .Cells(.Rows.Count, "A").End(xlUp).Row
For Each rngC In .Range("A1:A" & LRow)
rngC = rngC & "*"
Next
End With
End Sub


Regards
Claus B.
--
Windows10
Office 2016
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 24
Default Replace wildcard character problem

mandag den 28. oktober 2019 kl. 16.47.19 UTC+1 skrev Claus Busch:
Hi,

Am Mon, 28 Oct 2019 08:28:27 -0700 (PDT) schrieb Daddy Sage:

My colleague has some texts written like

*Abe
*Benzen
*Munoni
*Monintor

and so on. Now he want to change the texts to

*Abe*
*Benzen*
*Munoni*
*Monintor*


try it with a helper column. If the first string is in A1 then use:
=A1&"*"
Then copy the helper column and insert it as values in column A.

Or try:

Sub Test()
Dim LRow As Long
Dim rngC As Range

With ActiveSheet
LRow = .Cells(.Rows.Count, "A").End(xlUp).Row
For Each rngC In .Range("A1:A" & LRow)
rngC = rngC & "*"
Next
End With
End Sub


Regards
Claus B.
--
Windows10
Office 2016


Great. But the problem is that he want it sone without VBA.
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Replace wildcard character problem

Daddy Sage wrote:

mandag den 28. oktober 2019 kl. 16.47.19 UTC+1 skrev Claus Busch:
Hi,

Am Mon, 28 Oct 2019 08:28:27 -0700 (PDT) schrieb Daddy Sage:

My colleague has some texts written like

*Abe
*Benzen
*Munoni
*Monintor

and so on. Now he want to change the texts to

*Abe*
*Benzen*
*Munoni*
*Monintor*


try it with a helper column. If the first string is in A1 then use:
=A1&"*"
Then copy the helper column and insert it as values in column A.

Or try:

Sub Test()
Dim LRow As Long
Dim rngC As Range

With ActiveSheet
LRow = .Cells(.Rows.Count, "A").End(xlUp).Row
For Each rngC In .Range("A1:A" & LRow)
rngC = rngC & "*"
Next
End With
End Sub


Regards
Claus B.
--
Windows10
Office 2016


Great. But the problem is that he want it sone without VBA.


Like what Claus Busch said :

try it with a helper column. If the first string is in A1 then use:


in B1 for example
=A1&"*"
Then copy the helper column and insert it as values in column A.


If you want to have the "good" text in colomn A (I dont recommand this).

--
Vie : n.f. maladie mortelle sexuellement transmissible
Benoit chez leraillez.com
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 24
Default Replace wildcard character problem

tirsdag den 29. oktober 2019 kl. 14.16.23 UTC+1 skrev Benoît:
Daddy Sage wrote:

mandag den 28. oktober 2019 kl. 16.47.19 UTC+1 skrev Claus Busch:
Hi,

Am Mon, 28 Oct 2019 08:28:27 -0700 (PDT) schrieb Daddy Sage:

My colleague has some texts written like

*Abe
*Benzen
*Munoni
*Monintor

and so on. Now he want to change the texts to

*Abe*
*Benzen*
*Munoni*
*Monintor*

try it with a helper column. If the first string is in A1 then use:
=A1&"*"
Then copy the helper column and insert it as values in column A.

Or try:

Sub Test()
Dim LRow As Long
Dim rngC As Range

With ActiveSheet
LRow = .Cells(.Rows.Count, "A").End(xlUp).Row
For Each rngC In .Range("A1:A" & LRow)
rngC = rngC & "*"
Next
End With
End Sub


Regards
Claus B.
--
Windows10
Office 2016


Great. But the problem is that he want it sone without VBA.


Like what Claus Busch said :

try it with a helper column. If the first string is in A1 then use:


in B1 for example
=A1&"*"
Then copy the helper column and insert it as values in column A.


If you want to have the "good" text in colomn A (I dont recommand this).

--
Vie : n.f. maladie mortelle sexuellement transmissible
Benoit chez leraillez.com


Thank you top both. I'll let him know.

Jan
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
Wildcard Character in IF formulas lightbulb Excel Discussion (Misc queries) 2 July 25th 08 02:53 PM
Wildcard character in MS Query Grd Excel Discussion (Misc queries) 2 November 5th 07 11:31 PM
How do you find and replace a Wildcard character in Excel? Wildcard Excel Discussion (Misc queries) 8 August 18th 05 01:18 AM
Wildcard character agenda9533 Excel Discussion (Misc queries) 1 May 11th 05 05:11 PM
Wildcard Character John Excel Worksheet Functions 7 November 30th 04 11:54 PM


All times are GMT +1. The time now is 11:55 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"