Text Background that disappears when user enter value

Tennisguuy

Well-known Member
Joined
Oct 17, 2007
Messages
564
Office Version
  1. 2016
Platform
  1. Windows
I am not sure if this can be done but I want to create cells on sheet named Auto that instructs the user what to input and then disappears when the value is entered. For example, in cells L53:L153 I want the text to show 7389 and it cells M53:M153 I want the text to show 03499 and it cells N53:N153 I want the text to show 23499.

Is that possible.
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
You could use Conditional formatting to change the font colour to match the cell colour, when a value is entered
 
Upvote 0
Sorry I meant to say while I want the background to show specific text the value they enter doesn't have to be the same value. The text instructs them more what should be entered but once they enter a value in the cell I want the background to disappear.
 
Upvote 0
If the "background" is text or numbers it will be overwritten by a user's entry. If the background is a cell fill (color or pattern), that can be removed using conditional formatting or by VBA. And, what do you want to happen to the "background" if the user makes an entry and then deletes it?
 
Upvote 0
The cell background would be text but how to do you enter text in the background to certain cells only. I know how to add a watermark to a sheet but not text as background to specific cells only
 
Upvote 0
What do you mean by "Enter text as background"?
 
Upvote 0
In that background of the cell like a watermark except I want the text in each cell. For example in rows L53:L154 I want each cell to read 7398
 
Upvote 0
In that background of the cell like a watermark except I want the text in each cell. For example in rows L53:L154 I want each cell to read 7398
Use your mouse to selectL53:L154, then type 7398 and press ctrl+enter keys.

You didn't answer this question:
What do you want to happen to the "background" if the user makes an entry (overwriting the background) and later deletes it?
 
Upvote 0
Joe I tried that and that just enters 7398 into each cell. It doesn't put it in the background. Sorry I forgot to answer your other question if they enter a value in the cell I wanted the background to disappear and if they delete the value then I would want it to reappear.
 
Upvote 0
Either a cell contains something or it doesn't.
If you set the font colour to light grey with the 7398 in the cell you could use something like
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
   If Target.CountLarge > 1 Then Exit Sub
   If Not Intersect(Target, Range("L53:L154")) Is Nothing Then
      Application.EnableEvents = False
      If Target = "" Then
         Target.Value = 7398
         Target.Font.ColorIndex = 15
      Else
         Target.Font.ColorIndex = 1
      End If
   End If
   Application.EnableEvents = True
End Sub
This code need to go in the relevant sheet module
 
Upvote 0

Forum statistics

Threads
1,215,514
Messages
6,125,265
Members
449,219
Latest member
daynle

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