Use unique or PIN number

mmsamaddar

New Member
Joined
May 26, 2015
Messages
14
Hi, I have in a problem, please be with me.
If cell A1 is blank, then Cell B1 looks invisible
If cell A1 is not blank, then Cell B1 looks also invisible
If cell A1 has unique value, then Cell B1 looks visible only
Note: A1 can be deleted or belongs a unique number that I created with Data Validation
For Conditional, I used the formula
1. =$A$1=""
2. =$A$1="unique number"
Here is the problem: If I try to input a number in cell A1(excluded unique number), then the Cell B1 shows the secret figure.
Actually, I want to use a unique number or PIN in the cell A1, the Cell B1 will be visible then, otherwise not visible. Though I used =IF(A1="","",Cell_B1_Formula)
Thanks in advance & waiting for the response
 

Some videos you may like

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.

Jeffrey Mahoney

Well-known Member
Joined
May 31, 2015
Messages
1,830
Office Version
  1. 365
Platform
  1. Windows
I don't know how far you wanted to take this but, here goes. I usually create a sheet named Setup or something else that I protect and Hide. Not your usually hide.

Create a Sheet Called Setup
In any cell put your unique number or PIN (I put mine in cell JM999)
Hide the Setup Sheet using the code below
Make sure you protect your VBA code with a password so they can't unhide the Setup Sheet
In Cell B1 add a formula similar to this: =IF(A1=Setup!JM999,"Secret Figure","")
Make sure Cell B1 is protected and hidden
Protect your sheet that contains cell B1

Now, enter your PIN into Cell A1 and it will show!



Code:
Sub HideSheetReallyWell()
  Dim Sht As Worksheet
  Set Sht = Sheets("Setup")
  Sht.Visible = xlSheetVeryHidden
End Sub

Sub UnHideSheet()
  Dim Sht As Worksheet
  Set Sht = Sheets("Setup")
  Sht.Visible = xlSheetVisible
End Sub
 

Watch MrExcel Video

Forum statistics

Threads
1,122,721
Messages
5,597,752
Members
414,171
Latest member
12Rev79

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
Top