Great way to Hide Sensitive Data

yankee428

Active Member
Joined
Apr 12, 2004
Messages
348
As we all know, Excel is not a secure environment by any means. If you want application security you need to step up to Access at a minimum , if not mySQL. So if you need to share a workbook with others, but don't want to give them rights to see the whole workbook, how do you hide certain data, yet still have access to it yourself.

There are tons of password hacks out there, so forget Excel Protection. And Hiding sheets is too easy to get around. You need to hide and lock down the hide.

1. create a workbook with two worksheets
2. create secret data table on sheet(2)
3. rename sheet(2) to a difficult to guess name (I'll use difficult!)
4. insert a combo box built from control toolbox on sheet(1) and give it the code from below(change parameters where needed)
5. in VBA, make difficult! xlVeryHidden
6. now password protect the VBA project

Users of the file now have read and lookup access to part of your data while you still hide the other part. The same could be done for data input using a textbox. Just make sure that you do not reference the name of the secret worksheet anywhere that is visible to the user.

Disclaimer: There is one work around that could be used to compromise this method, but as far as I can see, this is as good as it gets.
Code:
Private Sub ComboBox1_Change()
Dim lkupval As String
Dim tblarray As Variant
Dim rslt As String
On Error GoTo errorhandler
'!!!!!!!!!!!!!!!!!!!!!!SET THE FOLLOWING FOUR PARAMATERS ACCORDING TO YOUR SHEET!!!!!!!!!!!!!!!!!!!!
lkupval = Sheets(1).Range("AA1")
tblarray = Sheets(2).Range("A1:D4")
lkupval2 = "AA1"
rslt = "F4"
If lkupval = "" Then
    Sheets(1).Range(rslt) = ""
    ComboBox1.Value = ""
    Exit Sub
End If
Cells(4, 6) = Application.WorksheetFunction.VLookup(lkupval, tblarray, 3, False)
Exit Sub
errorhandler:
    MsgBox "Please Choose from the drop down list"
    ComboBox1.Value = ""
    Sheets(1).Range(lkupval2).Value = ""
    Sheets(1).Range("F4").Select
End Sub
 
hash?

can someone get a little more plain english about what a hash is ... why can't the file save the actual password itself? it must generate this hash? where can I learn more about this stuff?
 
Upvote 0

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Hello mForteed

In short a "hash" is basically the encrypted password. From this posting what you really need to know is this..... excel is not secure any 12 year can hack it in about 5 minutes.... however CIO's will take alot longer to hack it . :wink:
 
Upvote 0
Nimrod said:
however it's a pretty good way to prevent very basic , honest , un-curious users from seeing source data ".... :wink: .... and has always had a place in my quiver of sol'ns

Whenever I provide the first version of anything to a client, before I trust that they'll pay up for the work, I put in a simple function that won't work past a certain date, and I lock down the VBA. I tell them that I've done this, and they just assume that it's unbreakable. So I guess it's a good psychological barrier.
 
Upvote 0

Forum statistics

Threads
1,216,030
Messages
6,128,418
Members
449,449
Latest member
Quiet_Nectarine_

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