Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 51
Default Can I use conditional formatting for this neat thing?

I had an idea this morning to make my user's lives easier for a particular
spreadsheet. The idea is to have a text string appear in cell C2 if it's
empty, and that is:

"Please enter value here ..."

And then when user enters a value, they'll see the data they've entered into
that cell until/unless they empty the cell.

Is this possible to do?

Again, I've just spent a considerable amount of time in the archives
searching for conditional formatting examples with text strings, but nothing
comes up that's pertinent.

TIA. :oD


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 156
Default Can I use conditional formatting for this neat thing?

try this:

right click on the sheet tab where you want C2 to change and select
view code from the menu(on the bottom) then paste this code into the
window

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("C2") = Empty Then
Range("C2").Value = "Please enter a value here..."
End If
End Sub


Sandy


StargateFanFromWork wrote:
I had an idea this morning to make my user's lives easier for a particular
spreadsheet. The idea is to have a text string appear in cell C2 if it's
empty, and that is:

"Please enter value here ..."

And then when user enters a value, they'll see the data they've entered into
that cell until/unless they empty the cell.

Is this possible to do?

Again, I've just spent a considerable amount of time in the archives
searching for conditional formatting examples with text strings, but nothing
comes up that's pertinent.

TIA. :oD


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 51
Default Can I use conditional formatting for this neat thing?

Not a good sign. This didn't work. I put the code exactly as below into
the vba in the window for this sheet, but nothing.

Did this work for you? Tx. :oD


"Sandy" wrote in message
oups.com...
try this:

right click on the sheet tab where you want C2 to change and select
view code from the menu(on the bottom) then paste this code into the
window

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("C2") = Empty Then
Range("C2").Value = "Please enter a value here..."
End If
End Sub


Sandy


StargateFanFromWork wrote:
I had an idea this morning to make my user's lives easier for a

particular
spreadsheet. The idea is to have a text string appear in cell C2 if

it's
empty, and that is:

"Please enter value here ..."

And then when user enters a value, they'll see the data they've entered

into
that cell until/unless they empty the cell.

Is this possible to do?

Again, I've just spent a considerable amount of time in the archives
searching for conditional formatting examples with text strings, but

nothing
comes up that's pertinent.

TIA. :oD



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Can I use conditional formatting for this neat thing?

StargateFanFromWork wrote:
Not a good sign. This didn't work. I put the code exactly as below into
the vba in the window for this sheet, but nothing.

The code works. Did you select a cell in the sheet after placing the code?
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 156
Default Can I use conditional formatting for this neat thing?

Also make sure that your EnableEvents is active, run this code to make
sure it is

Place this in the same way you pasted the last code, to run it press
alt + F8 together and select Myenable and click run, this will allow
worksheet/workbook events to run.


Sub Myenable()
Application.EnableEvents = True
End Sub

Sandy


StargateFanFromWork wrote:
Not a good sign. This didn't work. I put the code exactly as below into
the vba in the window for this sheet, but nothing.

Did this work for you? Tx. :oD


"Sandy" wrote in message
oups.com...
try this:

right click on the sheet tab where you want C2 to change and select
view code from the menu(on the bottom) then paste this code into the
window

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("C2") = Empty Then
Range("C2").Value = "Please enter a value here..."
End If
End Sub


Sandy


StargateFanFromWork wrote:
I had an idea this morning to make my user's lives easier for a

particular
spreadsheet. The idea is to have a text string appear in cell C2 if

it's
empty, and that is:

"Please enter value here ..."

And then when user enters a value, they'll see the data they've entered

into
that cell until/unless they empty the cell.

Is this possible to do?

Again, I've just spent a considerable amount of time in the archives
searching for conditional formatting examples with text strings, but

nothing
comes up that's pertinent.

TIA. :oD




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 51
Default Can I use conditional formatting for this neat thing?

Perfect!! Thank you, that's like magic. Enabling set everything in motion,
it seems.

I set up the sheet so that it's ready to go with the text string showing.
Since it's a locked template, each test shows the text is in place on
launching and it prompts user on where to start in a simple, straightforward
way.

Gotta love Excel! <g

Thanks. :oD

"Sandy" wrote in message
oups.com...
Also make sure that your EnableEvents is active, run this code to make
sure it is

Place this in the same way you pasted the last code, to run it press
alt + F8 together and select Myenable and click run, this will allow
worksheet/workbook events to run.


Sub Myenable()
Application.EnableEvents = True
End Sub

Sandy


StargateFanFromWork wrote:
Not a good sign. This didn't work. I put the code exactly as below

into
the vba in the window for this sheet, but nothing.

Did this work for you? Tx. :oD


"Sandy" wrote in message
oups.com...
try this:

right click on the sheet tab where you want C2 to change and select
view code from the menu(on the bottom) then paste this code into the
window

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("C2") = Empty Then
Range("C2").Value = "Please enter a value here..."
End If
End Sub


Sandy


StargateFanFromWork wrote:
I had an idea this morning to make my user's lives easier for a

particular
spreadsheet. The idea is to have a text string appear in cell C2 if

it's
empty, and that is:

"Please enter value here ..."

And then when user enters a value, they'll see the data they've

entered
into
that cell until/unless they empty the cell.

Is this possible to do?

Again, I've just spent a considerable amount of time in the archives
searching for conditional formatting examples with text strings, but

nothing
comes up that's pertinent.

TIA. :oD




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 51
Default Can I use conditional formatting for this neat thing?

Woops, forgot to mention. Before user inputs a dollar amount, all
subsequent cells with dependent formulas show up as the confusing #VALUE!.
It turned out extremely easy to set up conditional formatting to make the
#VALUE! text disappear. I changed the regular font in cell so that it's the
same colour as the cell background. In the conditional formatting, I tested
out having cell value 0 with an actual font colour and the cell results
show up as numbers in a sane and rational way once the user goes into the
cell and inputs a dollar amount. Very kewl.

Thanks for this, once again. :oD

"StargateFanFromWork" wrote in message
...
Perfect!! Thank you, that's like magic. Enabling set everything in

motion,
it seems.

I set up the sheet so that it's ready to go with the text string showing.
Since it's a locked template, each test shows the text is in place on
launching and it prompts user on where to start in a simple,

straightforward
way.

Gotta love Excel! <g

Thanks. :oD

"Sandy" wrote in message
oups.com...
Also make sure that your EnableEvents is active, run this code to make
sure it is

Place this in the same way you pasted the last code, to run it press
alt + F8 together and select Myenable and click run, this will allow
worksheet/workbook events to run.


Sub Myenable()
Application.EnableEvents = True
End Sub

Sandy


StargateFanFromWork wrote:
Not a good sign. This didn't work. I put the code exactly as below

into
the vba in the window for this sheet, but nothing.

Did this work for you? Tx. :oD


"Sandy" wrote in message
oups.com...
try this:

right click on the sheet tab where you want C2 to change and select
view code from the menu(on the bottom) then paste this code into the
window

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("C2") = Empty Then
Range("C2").Value = "Please enter a value here..."
End If
End Sub


Sandy


StargateFanFromWork wrote:
I had an idea this morning to make my user's lives easier for a
particular
spreadsheet. The idea is to have a text string appear in cell C2

if
it's
empty, and that is:

"Please enter value here ..."

And then when user enters a value, they'll see the data they've

entered
into
that cell until/unless they empty the cell.

Is this possible to do?

Again, I've just spent a considerable amount of time in the

archives
searching for conditional formatting examples with text strings,

but
nothing
comes up that's pertinent.

TIA. :oD



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
Neat Trick Frank Pytel Excel Discussion (Misc queries) 4 April 21st 08 09:20 PM
Sharing a neat trick MartinW Excel Discussion (Misc queries) 6 July 9th 07 12:52 AM
get rid of formatting clipboard thing? GoBobbyGo Excel Discussion (Misc queries) 1 June 12th 06 03:14 PM
Writing neat code Roderick O'Regan Excel Programming 2 December 31st 05 12:39 AM
Keeping macros neat verizon Excel Programming 6 July 16th 03 02:30 AM


All times are GMT +1. The time now is 08:13 AM.

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"