Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 45
Default replacing text in a cell

Hello,

I have a file with about 5,000 records. A majority of them are fine, but
some of them have an * in the cell. This prevents my query from matching up
with another file, because there should not be a * in the cell.

so for example one file contains this product id:

FRK F218026*

and the other file contains

FRK F218026

I have tried to do a replace, but when I replace the * everything
disappears. I next tried to filter on anything that contains an *, but that
didn't filter anything. Apparently MS Excel "thinks" that there is an * in
every cell.

Any suggestions would be greatly appreciated.

Thank you,
Roger
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,316
Default replacing text in a cell

Assuming that the asterisk is always the last character...

Insert a helper column to the right of the product ID and enter the
following formula, changing cell addresses as needed:

=IF(RIGHT(A1,1)="*",LEFT(A1,LEN(A1)-1),A1)

Copy down the column as far as necessary.

Copy the entire contents of the helper column, move to the first cell in the
product ID column and click EDIT in the menu, select PASTE SPECIAL and then
click the VALUES option button. Click OK to complete.

Delete the helper column when done.
--
Kevin Backmann


"Roger Converse" wrote:

Hello,

I have a file with about 5,000 records. A majority of them are fine, but
some of them have an * in the cell. This prevents my query from matching up
with another file, because there should not be a * in the cell.

so for example one file contains this product id:

FRK F218026*

and the other file contains

FRK F218026

I have tried to do a replace, but when I replace the * everything
disappears. I next tried to filter on anything that contains an *, but that
didn't filter anything. Apparently MS Excel "thinks" that there is an * in
every cell.

Any suggestions would be greatly appreciated.

Thank you,
Roger

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,572
Default replacing text in a cell

When you're looking to work on *'s or ?'s, you have to precede them with an
tilde (~).

So in Find What, enter
~*

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"Roger Converse" wrote in message
...
Hello,

I have a file with about 5,000 records. A majority of them are fine, but
some of them have an * in the cell. This prevents my query from matching
up
with another file, because there should not be a * in the cell.

so for example one file contains this product id:

FRK F218026*

and the other file contains

FRK F218026

I have tried to do a replace, but when I replace the * everything
disappears. I next tried to filter on anything that contains an *, but
that
didn't filter anything. Apparently MS Excel "thinks" that there is an *
in
every cell.

Any suggestions would be greatly appreciated.

Thank you,
Roger



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 45
Default replacing text in a cell

Thank you both for the reply. I tried the ~* method and it worked perfectly.

I will keep that other formula handy. I am sure I can find uses for that as
well.

Thank you,
Roger

"RagDyer" wrote:

When you're looking to work on *'s or ?'s, you have to precede them with an
tilde (~).

So in Find What, enter
~*

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"Roger Converse" wrote in message
...
Hello,

I have a file with about 5,000 records. A majority of them are fine, but
some of them have an * in the cell. This prevents my query from matching
up
with another file, because there should not be a * in the cell.

so for example one file contains this product id:

FRK F218026*

and the other file contains

FRK F218026

I have tried to do a replace, but when I replace the * everything
disappears. I next tried to filter on anything that contains an *, but
that
didn't filter anything. Apparently MS Excel "thinks" that there is an *
in
every cell.

Any suggestions would be greatly appreciated.

Thank you,
Roger




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,572
Default replacing text in a cell

You're welcome, and thank you for the feed-back.

If you like using formulas, you can try this one:

=SUBSTITUTE(A1,"*","")

--
Regards,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"Roger Converse" wrote in message
...
Thank you both for the reply. I tried the ~* method and it worked
perfectly.

I will keep that other formula handy. I am sure I can find uses for that
as
well.

Thank you,
Roger

"RagDyer" wrote:

When you're looking to work on *'s or ?'s, you have to precede them with
an
tilde (~).

So in Find What, enter
~*

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"Roger Converse" wrote in
message
...
Hello,

I have a file with about 5,000 records. A majority of them are fine,
but
some of them have an * in the cell. This prevents my query from
matching
up
with another file, because there should not be a * in the cell.

so for example one file contains this product id:

FRK F218026*

and the other file contains

FRK F218026

I have tried to do a replace, but when I replace the * everything
disappears. I next tried to filter on anything that contains an *, but
that
didn't filter anything. Apparently MS Excel "thinks" that there is an
*
in
every cell.

Any suggestions would be greatly appreciated.

Thank you,
Roger






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
Replacing Text for Template Wendy7 Excel Worksheet Functions 0 March 14th 07 02:56 PM
replacing text in all cells with existing text plus something avi2001 Excel Discussion (Misc queries) 2 November 2nd 05 04:29 PM
Replacing #N/A with other text Dave Excel Worksheet Functions 2 August 11th 05 11:27 PM
Help replacing text with Yes or No Jerry Arnone, PMP Excel Discussion (Misc queries) 6 June 24th 05 02:05 AM
INTRICATE PROBLEM- How to find multiple text,excluding "H", in a multiple range of cells, then replacing 0 with another number in another cell Tourcat Excel Worksheet Functions 1 February 8th 05 06:26 PM


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