Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default formatting based on text

I need to format several docs every day. They're programs written in Notepad
and any line that starts off with <! is a comment. My job is to copy the
text from Notepad and change all comment lines to be white text with a black
background. Is there some way for Excel to do this automatically?

I know there are other programs besides Notepad but this is what I'm stuck
with doing so I can't change the process.


  #2   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel
ben ben is offline
external usenet poster
 
Posts: 232
Default formatting based on text

Sandra,

You said you are copying it from notepad, is the final result going to be in
excel or not? If it is you can use excel autoformating.

"Sandra" wrote:

I need to format several docs every day. They're programs written in Notepad
and any line that starts off with <! is a comment. My job is to copy the
text from Notepad and change all comment lines to be white text with a black
background. Is there some way for Excel to do this automatically?

I know there are other programs besides Notepad but this is what I'm stuck
with doing so I can't change the process.



  #3   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel
bj bj is offline
external usenet poster
 
Posts: 1,397
Default formatting based on text

You can use condtional formatting
Highlight the excell cells with the information from the notepad
<format<conditinal formating

Set condition one
<formula is =left($a1,2)="<!"
set format for white font color and black pattern

Note it is sometimes necewssary to edit the conditional formats. I have had
then change from relative to absolute references or visa versa when I first
hit enter. Also they have a trendency to add odd Quote marks where I don't
want quote marks.





"Sandra" wrote:

I need to format several docs every day. They're programs written in Notepad
and any line that starts off with <! is a comment. My job is to copy the
text from Notepad and change all comment lines to be white text with a black
background. Is there some way for Excel to do this automatically?

I know there are other programs besides Notepad but this is what I'm stuck
with doing so I can't change the process.



  #4   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel
CLR CLR is offline
external usenet poster
 
Posts: 594
Default formatting based on text

And if you want a toggle to turn the whole field off and on, use this
formula in the Conditional Formatting window.........
=AND(LEFT($A1,2)-"<!",$M$1=1)

Then, as long as there is a 1 in M1, the formatting will be as bj describes,
otherwise it will be toggled off.

Vaya con Dios,
Chuck, CABGx3



"bj" wrote in message
...
You can use condtional formatting
Highlight the excell cells with the information from the notepad
<format<conditinal formating

Set condition one
<formula is =left($a1,2)="<!"
set format for white font color and black pattern

Note it is sometimes necewssary to edit the conditional formats. I have

had
then change from relative to absolute references or visa versa when I

first
hit enter. Also they have a trendency to add odd Quote marks where I

don't
want quote marks.





"Sandra" wrote:

I need to format several docs every day. They're programs written in

Notepad
and any line that starts off with <! is a comment. My job is to copy the
text from Notepad and change all comment lines to be white text with a

black
background. Is there some way for Excel to do this automatically?

I know there are other programs besides Notepad but this is what I'm

stuck
with doing so I can't change the process.





  #5   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel
external usenet poster
 
Posts: 4
Default formatting based on text

I love this - thanks guys

"CLR" wrote in message
...
And if you want a toggle to turn the whole field off and on, use this
formula in the Conditional Formatting window.........
=AND(LEFT($A1,2)-"<!",$M$1=1)

Then, as long as there is a 1 in M1, the formatting will be as bj

describes,
otherwise it will be toggled off.

Vaya con Dios,
Chuck, CABGx3



"bj" wrote in message
...
You can use condtional formatting
Highlight the excell cells with the information from the notepad
<format<conditinal formating

Set condition one
<formula is =left($a1,2)="<!"
set format for white font color and black pattern

Note it is sometimes necewssary to edit the conditional formats. I have

had
then change from relative to absolute references or visa versa when I

first
hit enter. Also they have a trendency to add odd Quote marks where I

don't
want quote marks.





"Sandra" wrote:

I need to format several docs every day. They're programs written in

Notepad
and any line that starts off with <! is a comment. My job is to copy

the
text from Notepad and change all comment lines to be white text with a

black
background. Is there some way for Excel to do this automatically?

I know there are other programs besides Notepad but this is what I'm

stuck
with doing so I can't change the process.









  #6   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel
CLR CLR is offline
external usenet poster
 
Posts: 594
Default formatting based on text

You're welcome Sandra........

Vaya con Dios,
Chuck, CABGx3

"Sandra" wrote in message
...
I love this - thanks guys

"CLR" wrote in message
...
And if you want a toggle to turn the whole field off and on, use this
formula in the Conditional Formatting window.........
=AND(LEFT($A1,2)-"<!",$M$1=1)

Then, as long as there is a 1 in M1, the formatting will be as bj

describes,
otherwise it will be toggled off.

Vaya con Dios,
Chuck, CABGx3



"bj" wrote in message
...
You can use condtional formatting
Highlight the excell cells with the information from the notepad
<format<conditinal formating

Set condition one
<formula is =left($a1,2)="<!"
set format for white font color and black pattern

Note it is sometimes necewssary to edit the conditional formats. I

have
had
then change from relative to absolute references or visa versa when I

first
hit enter. Also they have a trendency to add odd Quote marks where I

don't
want quote marks.





"Sandra" wrote:

I need to format several docs every day. They're programs written in

Notepad
and any line that starts off with <! is a comment. My job is to copy

the
text from Notepad and change all comment lines to be white text with

a
black
background. Is there some way for Excel to do this automatically?

I know there are other programs besides Notepad but this is what I'm

stuck
with doing so I can't change the process.









  #7   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel
external usenet poster
 
Posts: 4
Default formatting based on text

I never could get the M1 = 1 trick to work. I can't see what I'm doing wrong
either.
Could someone lpease try this and if it works for them walk me thru step by
step what to type or click and when to do it. I feel so stupid.

"Sandra" wrote in message
...
I love this - thanks guys

"CLR" wrote in message
...
And if you want a toggle to turn the whole field off and on, use this
formula in the Conditional Formatting window.........
=AND(LEFT($A1,2)-"<!",$M$1=1)

Then, as long as there is a 1 in M1, the formatting will be as bj

describes,
otherwise it will be toggled off.

Vaya con Dios,
Chuck, CABGx3



"bj" wrote in message
...
You can use condtional formatting
Highlight the excell cells with the information from the notepad
<format<conditinal formating

Set condition one
<formula is =left($a1,2)="<!"
set format for white font color and black pattern

Note it is sometimes necewssary to edit the conditional formats. I

have
had
then change from relative to absolute references or visa versa when I

first
hit enter. Also they have a trendency to add odd Quote marks where I

don't
want quote marks.





"Sandra" wrote:

I need to format several docs every day. They're programs written in

Notepad
and any line that starts off with <! is a comment. My job is to copy

the
text from Notepad and change all comment lines to be white text with

a
black
background. Is there some way for Excel to do this automatically?

I know there are other programs besides Notepad but this is what I'm

stuck
with doing so I can't change the process.









  #8   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default formatting based on text

Sorry Sandra, my bad........typo in the formula, should have been:

=AND(LEFT($A1,2)="<!",$M$1=1)

instead of:
=AND(LEFT($A1,2)-"<!",$M$1=1)

Highlight the range of cells containing your data, say A1:L30, then Format
Conditional Formatting.....then in the left window of the pop-up, select from
the dropdown arrow "Formula Is", and in the right window, type the correct
version of the above formula.......then FormatButton and select your choice
of formatting OK OK

Then you must hand-type a 1 in cell M1 for the Conditional Formatting to be
active.
(You could have selected any other cell that might be more out of the way of
your data, but must have changed it in the formulas first)

hth
Vaya con Dios,
Chuck, CABGx3



"Sandra" wrote:

I never could get the M1 = 1 trick to work. I can't see what I'm doing wrong
either.
Could someone lpease try this and if it works for them walk me thru step by
step what to type or click and when to do it. I feel so stupid.

"Sandra" wrote in message
...
I love this - thanks guys

"CLR" wrote in message
...
And if you want a toggle to turn the whole field off and on, use this
formula in the Conditional Formatting window.........
=AND(LEFT($A1,2)-"<!",$M$1=1)

Then, as long as there is a 1 in M1, the formatting will be as bj

describes,
otherwise it will be toggled off.

Vaya con Dios,
Chuck, CABGx3



"bj" wrote in message
...
You can use condtional formatting
Highlight the excell cells with the information from the notepad
<format<conditinal formating

Set condition one
<formula is =left($a1,2)="<!"
set format for white font color and black pattern

Note it is sometimes necewssary to edit the conditional formats. I

have
had
then change from relative to absolute references or visa versa when I
first
hit enter. Also they have a trendency to add odd Quote marks where I
don't
want quote marks.





"Sandra" wrote:

I need to format several docs every day. They're programs written in
Notepad
and any line that starts off with <! is a comment. My job is to copy

the
text from Notepad and change all comment lines to be white text with

a
black
background. Is there some way for Excel to do this automatically?

I know there are other programs besides Notepad but this is what I'm
stuck
with doing so I can't change the process.










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
Conditional Formatting based on text within a cell w/ text AND num Shirley Excel Worksheet Functions 2 December 22nd 06 01:40 AM
Conditional Formatting based on Text within Text George Lynch Excel Discussion (Misc queries) 3 May 5th 05 07:58 PM
formatting based on text Sandra Excel Discussion (Misc queries) 8 March 28th 05 05:43 PM
Conditional formatting based on text Gilles Desjardins Excel Worksheet Functions 8 February 16th 05 10:45 PM
Deleting Rows based on text in cell & formatting cell based on text in column beside it Steve Excel Programming 4 February 26th 04 03:31 PM


All times are GMT +1. The time now is 05:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"