PC Review


Reply
Thread Tools Rate Thread

Can I use conditional formatting for this neat thing?

 
 
StargateFanFromWork
Guest
Posts: n/a
 
      2nd Nov 2006
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. D


 
Reply With Quote
 
 
 
 
Sandy
Guest
Posts: n/a
 
      2nd Nov 2006
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. D


 
Reply With Quote
 
StargateFanFromWork
Guest
Posts: n/a
 
      2nd Nov 2006
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. D


"Sandy" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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. D



 
Reply With Quote
 
bill robertson
Guest
Posts: n/a
 
      2nd Nov 2006
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?
 
Reply With Quote
 
Sandy
Guest
Posts: n/a
 
      2nd Nov 2006
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. D
>
>
> "Sandy" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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. D


 
Reply With Quote
 
StargateFanFromWork
Guest
Posts: n/a
 
      2nd Nov 2006
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. D

"Sandy" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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. D
> >
> >
> > "Sandy" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > 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. D

>



 
Reply With Quote
 
StargateFanFromWork
Guest
Posts: n/a
 
      2nd Nov 2006
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. D

"StargateFanFromWork" <(E-Mail Removed)> wrote in message
news:u1Dy3Cs$(E-Mail Removed)...
> 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. D
>
> "Sandy" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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. D
> > >
> > >
> > > "Sandy" <(E-Mail Removed)> wrote in message
> > > news:(E-Mail Removed)...
> > > > 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. D



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange Thing is Happen In If Conditional BillGatesFan Microsoft VB .NET 1 13th Apr 2008 12:39 PM
Conditional Formatting No Longer Conditional in 2007 Beta =?Utf-8?B?Q2FjdHVhci1Oby1KdXRzdQ==?= Microsoft Excel Crashes 0 17th Nov 2006 10:01 PM
get rid of formatting clipboard thing? =?Utf-8?B?R29Cb2JieUdv?= Microsoft Excel Misc 1 12th Jun 2006 03:14 PM
Conditional Formatting that will display conditional data =?Utf-8?B?QnJhaW5GYXJ0?= Microsoft Excel Worksheet Functions 1 13th Sep 2005 05:45 PM
UGH...This Formatting thing, again!!! Michael P Gabriel Windows XP General 4 20th Mar 2004 01:14 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:38 PM.