text placeholder

G

Guest

Guest
hello everyone...

I asked this before, but didn't have any luck. I would like to do the following: have a certain piece of text (ie- "enter age here") in cell A1, unless the user enters their age there. When it is deleted, I would like the text to reappear (ie. "enter age here") In other words, this text would be a placeholer that informs the user of what to enter, dissappears when the user enters the text, and then reappears when the information is deleted from the cell. Any ideas? Thanks in advance!!!
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Type this into the worksheet_change module:

If Range("A1").Value = Empty Then
Range("a1").Value = "Enter text here"
End If

Hope that helps.
Giacomo
 
Upvote 0
Hi, Assuming that your age is entered into cell B1 - you could put the following formula into cell A1:

cell A1 = if(B1="","Enter Age Here","")

Hope this helps.
 
Upvote 0
Enter the formula, =IF(ISBLANK(B1),"Enter Age Here",""), into A1. Set the Column width of column A to 0.08.
This message was edited by Mark W. on 2002-02-25 11:18
 
Upvote 0
No luck...perhaps I am doing something incorrect...I don't see the text in the cell after putting in this code. Maybe I am putting the code in the wrong area, or I am missing a few steps? Can you explain it any more? Thanks, sorry for the trouble!
 
Upvote 0
The following post works:

Enter the formula, =IF(ISBLANK(B1),"Enter Age Here",""), into A1. Set the Column width of column A to 0.08.

Except, once a number is entered and then deleted, so is the formula. I am look for a solution like that above, but when the number is deleted, the "enter age here" is once again displayed, etc. Thanks guys!
 
Upvote 0
the code I gave you should work whenever the worksheet has changed. You may have to hit "F9" to make it appear the first time. Then after that it should work fine.

Giacomo
 
Upvote 0
giacomo,

Still no luck..I've tried "F9", and it doesn't appear. I really still want to make this work though. Maybe I am putting the code in the wrong place...can you explain in more detail? Also, right now the cell (A1) is emtpy too...do I need to type in "enter age here" into the cell first? Any further suggestions/help would be great....Thanks!
 
Upvote 0
Well, I tested pressing F9 and it didn't work for me either, sorry. If you enter a number into cell A1 and then delete it, it should work however. Actually if you type something anywhere and delete it should work.

I entered the code by right-clicking on the worksheet tab and pressing "view code". Then by default I get the "Worksheet_SelectionChange" sub, you have to click on the drop down box that says "Selection Change" and choose just "Change", after you do this you'll probably see both the "Worksheet_SelectionChange" and the "Worksheet_Change" subs. Paste the code in the Worksheet_Change sub above where it says "end sub".

email me at giacomo22@hotmail.com, if you're still having problems. I'll send you a test sheet.

Giacomo
 
Upvote 0
On 2002-02-25 11:28, Anonymous wrote:
The following post works:

Enter the formula, =IF(ISBLANK(B1),"Enter Age Here",""), into A1. Set the Column width of column A to 0.08.

Except, once a number is entered and then deleted, so is the formula. I am look for a solution like that above, but when the number is deleted, the "enter age here" is once again displayed, etc. Thanks guys!

> ...once a number is entered and then deleted, so is the formula...

No, it isn't because you reserve column A for the formula and you enter the value in column
B. When column A's width is set to 0.08 it gives the illusion that "Enter Age Here" is in the adjacent cell.
This message was edited by Mark W. on 2002-02-25 12:41
 
Upvote 0

Forum statistics

Threads
1,213,536
Messages
6,114,202
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top