ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Format that Omits Characters (https://www.excelbanter.com/excel-discussion-misc-queries/209568-format-omits-characters.html)

Lemmesee

Format that Omits Characters
 
I need a format that omits all of the characters before a hyphen (-) and one
after it.
example;
001- ABC displayed as ABC

I can easily do this with a formula but I need to do it in a format.

Sheeloo[_3_]

Format that Omits Characters
 
I don't think this can be done...

I will be happy to learn a new trick if someone provides a solution.

"Lemmesee" wrote:

I need a format that omits all of the characters before a hyphen (-) and one
after it.
example;
001- ABC displayed as ABC

I can easily do this with a formula but I need to do it in a format.


Lemmesee

Format that Omits Characters
 
is it possible to make a custom format that omits the first 5 chars?

"Sheeloo" wrote:

I don't think this can be done...

I will be happy to learn a new trick if someone provides a solution.

"Lemmesee" wrote:

I need a format that omits all of the characters before a hyphen (-) and one
after it.
example;
001- ABC displayed as ABC

I can easily do this with a formula but I need to do it in a format.


Sheeloo[_3_]

Format that Omits Characters
 
That will solve your problem, won't it?

To the best of my knowledge and belief, I don't think it is possible.

However I have learnt not to say 'never'...

"Lemmesee" wrote:

is it possible to make a custom format that omits the first 5 chars?

"Sheeloo" wrote:

I don't think this can be done...

I will be happy to learn a new trick if someone provides a solution.

"Lemmesee" wrote:

I need a format that omits all of the characters before a hyphen (-) and one
after it.
example;
001- ABC displayed as ABC

I can easily do this with a formula but I need to do it in a format.


Lemmesee

Format that Omits Characters
 
Yes it would but i will just have to settle for using a formula in another
column and hide the column with the original text in it..
But much thanks anyway.

"Sheeloo" wrote:

That will solve your problem, won't it?

To the best of my knowledge and belief, I don't think it is possible.

However I have learnt not to say 'never'...

"Lemmesee" wrote:

is it possible to make a custom format that omits the first 5 chars?

"Sheeloo" wrote:

I don't think this can be done...

I will be happy to learn a new trick if someone provides a solution.

"Lemmesee" wrote:

I need a format that omits all of the characters before a hyphen (-) and one
after it.
example;
001- ABC displayed as ABC

I can easily do this with a formula but I need to do it in a format.


Fred Smith[_4_]

Format that Omits Characters
 
The formula which omits the first five characters would be:

=mid(a1,6,100)

Regards,
Fred.

"Lemmesee" wrote in message
...
Yes it would but i will just have to settle for using a formula in another
column and hide the column with the original text in it..
But much thanks anyway.

"Sheeloo" wrote:

That will solve your problem, won't it?

To the best of my knowledge and belief, I don't think it is possible.

However I have learnt not to say 'never'...

"Lemmesee" wrote:

is it possible to make a custom format that omits the first 5 chars?

"Sheeloo" wrote:

I don't think this can be done...

I will be happy to learn a new trick if someone provides a solution.

"Lemmesee" wrote:

I need a format that omits all of the characters before a hyphen
(-) and one
after it.
example;
001- ABC displayed as ABC

I can easily do this with a formula but I need to do it in a
format.



ShaneDevenshire

Format that Omits Characters
 
Hi,

Here is a little bit of code which will do what you want. You could modify
it to be more general.

Sub Hide5Spaces()
Dim cell As Range
For Each cell In Selection
cell.Characters(Start:=1, Length:=5).Font.ColorIndex = 2
Next cell
End Sub

Right now it works only for the first five characters and it work if the
background cell fill is none. But you could change all that.

If this helps, please click the Yes button.
--
Thanks,
Shane Devenshire


"Lemmesee" wrote:

I need a format that omits all of the characters before a hyphen (-) and one
after it.
example;
001- ABC displayed as ABC

I can easily do this with a formula but I need to do it in a format.


Lemmesee

Format that Omits Characters
 
I dont see how to make the code run.

"ShaneDevenshire" wrote:

Hi,

Here is a little bit of code which will do what you want. You could modify
it to be more general.

Sub Hide5Spaces()
Dim cell As Range
For Each cell In Selection
cell.Characters(Start:=1, Length:=5).Font.ColorIndex = 2
Next cell
End Sub

Right now it works only for the first five characters and it work if the
background cell fill is none. But you could change all that.

If this helps, please click the Yes button.
--
Thanks,
Shane Devenshire


"Lemmesee" wrote:

I need a format that omits all of the characters before a hyphen (-) and one
after it.
example;
001- ABC displayed as ABC

I can easily do this with a formula but I need to do it in a format.



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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com