How to create multiple text placeholder that disappears when user click on them

matteoB

New Member
Joined
Aug 31, 2021
Messages
1
Office Version
  1. 365
Platform
  1. MacOS
Hi everyone!

I am wondering how to create text placeholders in cells that disappears when users click on them in order to fill with information, like some online form that you have to fill to register some service or account.

For example, I have a sheet with a form where I need that users insert some info as "City", "Address", "Day" and "Time". Every of these cells have the relative placeholder "City", "Address", "Day" and "Time" wrote in color grey. When users double click on them, the placeholders disappear and users can enter their text (i.e. I want the text in the exact cell to be used).

Thank you in advance,
Matteo
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
https://excelribbon.tips.net/T000614_Showing_Text_when_a_Cell_is_Empty.html

VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Address = "$B$4" Then
        If Target = "" Then
            ' Cell is empty; mark it and make gray
            Target = "(Customer Name)"
            With Selection.Font
                .ThemeColor = xlThemeColorDark1
                .TintAndShade = -0.249977111117893
            End With
        Else
            ' Cell contains something; remove gray
            With Selection.Font
                .ColorIndex = xlAutomatic
                .TintAndShade = 0
            End With
        End If
    End If
End Sub

Here is another method ... if all "suggested text" is located in the same column :

Instructional text in cells in Excel | Western Sydney University

As you can see from the instructions ... this method uses a 'helper column' that is partially hidden.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,331
Members
452,636
Latest member
laura12345

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