Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default Conditional Text?

Hi There,

Is the following possible?

I would like to show in my cell:

<Double Click Me

when the cell is empty.



Like you could do with conditional formatting, Color the cell condition
the cell is empty.

Looking forward to your solutions,
Sige

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Conditional Text?

How about this for a bit of nonsense?

For all cells that you want this to apply to, create a complementary cell
referencing (such as =A1)

Then in the complementary cells, add a custom format of
General;-General;"<Double click me"

Using the camera tool, copy images of the complementary cells over to the
actual cells.

--
HTH

Bob Phillips

"Sige" wrote in message
ups.com...
Hi There,

Is the following possible?

I would like to show in my cell:

<Double Click Me

when the cell is empty.



Like you could do with conditional formatting, Color the cell condition
the cell is empty.

Looking forward to your solutions,
Sige



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default Conditional Text?

Hi Bob, Norman,

Thanks for your solutions ...

Bob: It works perfectly fine but -for once- I do not want to have a
formula in my cell to invoke it it ...
Norman: How can I invoke it? ... How does it get triggered?

Sige

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Conditional Text?

Hi Sige,

Norman: How can I invoke it? ... How does it get triggered?


If the code is pasted into the worksheet's code module, then the code should
respond automatically to changes in the sheet's A1 cell.

---
Regards,
Norman



"Sige" wrote in message
oups.com...
Hi Bob, Norman,

Thanks for your solutions ...

Bob: It works perfectly fine but -for once- I do not want to have a
formula in my cell to invoke it it ...
Norman: How can I invoke it? ... How does it get triggered?

Sige



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default Conditional Text?

Hi Norman,
Thanks!

Thats what I thought and nothing happened ... my workbook got on Manual
Calc, maybe thats why.

Is it possible to set the range.... on the cell in last row in column
D?

Something like:
Dim intColumn As Integer, lngLastRow As Long
intColumn = 4
lngLastRow = .Cells(.Rows.Count, intColumn).End(xlUp).Row

But this obviously does not set the last cell...

Cheers Sige



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default Conditional Text?

This does not set the range neither...

Set rng = Range("d65536").End(xlUp).Address

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Conditional Text?

Hi Sige,

Thats what I thought and nothing happened ... my workbook got on
Manual Calc, maybe thats why.


The calculation setting should have no bearing.

Are you sure that the code has been pasted into the code module behind the
active worksheet?

If so, perhaps you have inadvertently disabled events. To eliminate this
possibility, paste the following code into a standard module:

Sub AAA
Application.EnableEvents = True
End Sub

After running this sub, try deleting the contents of cell A1, which should
produce the required message text in A1.

Is it possible to set the range.... on the cell in last row in
column D?


If your intention is that the cell after the last populated cell in column D
should display the message text, then try instead:

'=====================
Private Sub Worksheet_Calculate()
Dim rng As Range
Dim LastCell As Range
Dim rcell As Range
Dim sStr As String
Const IntCol As Long = 4

sStr = "Double Click Me"

Set LastCell = Cells(Me.Rows.Count, IntCol).End(xlUp)(2)
Set rng = Range(Cells(1, IntCol), LastCell)

On Error GoTo XIT

Application.EnableEvents = False

For Each rcell In rng.Cells
If rcell.Value = sStr Then rcell.ClearContents
Next rcell

Set LastCell = Cells(Me.Rows.Count, IntCol).End(xlUp)(2)
LastCell.Value = sStr

XIT:
Application.EnableEvents = True

End Sub
''<<=====================

Unlike the previous procedure, this code responds to the worksheet's
calculate event and, therefore, requires that calculation should not be set
to manual.

In order to coerce the calculation event, you might consider including a
volatile worksheet function (such as Now(), Indirect(), Offset)) somewhere
in the sheet.


---
Regards,
Norman



"Sige" wrote in message
ups.com...
Hi Norman,
Thanks!

Thats what I thought and nothing happened ... my workbook got on Manual
Calc, maybe thats why.

Is it possible to set the range.... on the cell in last row in column
D?

Something like:
Dim intColumn As Integer, lngLastRow As Long
intColumn = 4
lngLastRow = .Cells(.Rows.Count, intColumn).End(xlUp).Row

But this obviously does not set the last cell...

Cheers Sige



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
using a conditional suffix in text function format syntax=text(value,format_text) Brotherharry Excel Worksheet Functions 1 January 13th 09 03:03 PM
conditional formatting in text box pankaj Excel Discussion (Misc queries) 0 November 1st 07 09:09 AM
Conditional Formatting based on text within a cell w/ text AND num Shirley Excel Worksheet Functions 2 December 22nd 06 01:40 AM
conditional text BorisS Excel Worksheet Functions 2 May 20th 05 04:25 AM
Conditional Formatting based on Text within Text George Lynch Excel Discussion (Misc queries) 3 May 5th 05 07:58 PM


All times are GMT +1. The time now is 03:24 PM.

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"