# Use unique or PIN number

##### New Member
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

### Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.

#### Jeffrey Mahoney

##### Well-known Member
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``````

Replies
5
Views
209
Replies
7
Views
347
Replies
8
Views
414
Replies
5
Views
572
Replies
7
Views
537

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

1,163,879
Messages
5,834,215
Members
430,263
Latest member
abz54

### 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.

### Which adblocker are you using?

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

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