Format Cells custom set up

Newbienew

Active Member
Joined
Mar 17, 2017
Messages
395
Office Version
  1. 2016
Platform
  1. Windows
I am looking to use format cells options to have a prompt that shows up in the cell to give direction such as "Enter Work Code Here" or " Work code Here" when there is nothing in the cell. Once its been entered, the messages is not long displayed unless the number and letters are entered.
Below i got from a site but should give a prospective of what I am aiming for

For example, the custom format for a Federal Tax ID looks like,

“TIN “###-##-####;”Enter nine positive digits”;”Enter your tax ID”
If the user enters a positive nine digits, then it appears as
TIN 123-45-6790
If the user enters a negative number, the message “Enter nine positive digits” appears. If a zero is entered as the default, then the prompt “Enter your tax ID” appears.
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
I suggest you use a combination of Custom number format and Data validation:
Select the cell to apply them to. Press Ctrl+1 (Cell formatting). Go to Number tab and select Custom in the list.
in the text field under Type paste this:
Code:
"TIN "000-00-0000;[Red] "invalid TIN";[Red] "invalid TIN"
Press ok.
Go to Data-> Data Validation.
On the settings tab select to allow Whole Number, check ignore blank, Data: between, Minimum: 100000000, Maximum: 999999999
On the Input message tab: check Show input message when ... , title: Enter Tax ID, input message: Enter nine positive digits (that's strange :) digit can't be negative - they are digits, not numbers)
On the Error alert tab: check Show error alert after ..., style: whatever you like, Title: Incorrect Tax ID, Error message: Enter nine positive digits
Press ok. then Save :)
That's it I think.
Let us know if it works for you.
 
Last edited:
Upvote 0
Only one tiny detail - if TINs can start with zero(s) then my suggestion is not the 100% right solution.
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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