Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

excel search cell from right to left for character 1

Status
Not open for further replies.

firegambler

Technical User
Sep 25, 2002
455
AT
Hi,

my challenge looks like this:
I have several values in a column like:
**Manufacturing
**Warehousing
***VARIABLE COSTS
****OPERATING PROFIT

I am longing to eliminate the asterisks.
So I would like to search the cells from the right for the first asterisk to appear so that I could do something like
=right(A4,searchfromright("*",A4))

Is there a way to get rid of those asterisks without having a ton of nested if-statements?

Any tip is greatly appreciated.

Thanks in advance!

regards

firegambler
 
Select all the data and do Edit / Replace, replacing ~* with nothing.

Note the tilde in front of the asterisk

Regards
Ken.............

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]
----------------------------------------------------------------------------
 
Or if you really want to go the formula route then try SUBSTITUTE()

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

Regards
Ken..............

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]
----------------------------------------------------------------------------
 
Hi,

thanks for your response.
I have to do it using a formula...
The thing is that there are from 0 to 4 asterisks in the cell and I need to delete them all no matter how many there are.
Substitute unfortunately needs parameters on how many characters to substitute but that value may vary from 0 to 4.

Any other ideas?



regards

firegambler
 
No it doesn't, that parameter is optional and if not used SUBSTITUTE will get rid of all of them.

Regards
Ken.............

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]
----------------------------------------------------------------------------
 
Wooohooo!
That did it.

I work on a german version of Excel,
and since 'substitute' in German means ERSETZEN
i thought that the function ERSETZEN would do it but that was the one that needed additional parameters.
Then I found out that the equivalent to the substitute-function is called WECHSELN in german. That did it.

Thanks a ton!

regards

firegambler
 
You're very welcome :)

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]
----------------------------------------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top