Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Hiding secret formulas

Kentucky Fried Chicken, Coca-Cola, etc. have secret trade formulas. Is
there a way to securely hide a secret formula?
I want to create a function (macro) that when applied to a particular
cell will compute a value based on variable elements of a spreadsheet
as multiplied by undisclosed fixed elements.

Example: Assume a1,b1, c1 and d1 have variables. Also assume that the
fixed elements are fe1=.4,fe2=.25,fe3=.11,fe4=.24 stored in the
function I created called rating.

Thus, cell e1 =(function) rating(a1,b1,c1,d1) and yields the result of
(a1*fe1)+(b1*fe2)+(c1*fe3)+(d1*4).

Is there a way to hide the declaration of a function or must the
function be declared in another language where it MIGHT be more
secure? The use of another language would seem to raise issues like
impact on speed.

Is it possible to create the function and disable macros to conceal
the process to all but the most knowledgeable Excel users?

A newbie at writing macros, any help provided will be appreciated...
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Hiding secret formulas

Here's one way

First select cell E1
Define a named formula, ctrl-F3
Name: myFunc
RefersTo: =(A1*FE1)+(B1*FE2)+(C1*FE3)+(D1*4)

in cell E1, =myFunc()

check the formula is OK

Now to hide it from all but mid level plus VBA'ers

in the VBE, Alt-F11, open the Immediate Window, ctrl-g, paste the following

activeworkbook.Names("myFunc").Visible = False

with the cursor at the end of the line hit enter (back in Excel look at the
names dialog ctrl-F3)

Note the named formula is relative to the cell that was selected when you
named it. My guess is you will want a combination of relative and absolute
addresses in the named formula (that is if you want to use myFunc elsewhere)

Regards,
Peter T

PS, when you want to see the named formula again change the False to True

"HappySenior" wrote in message
...
Kentucky Fried Chicken, Coca-Cola, etc. have secret trade formulas. Is
there a way to securely hide a secret formula?
I want to create a function (macro) that when applied to a particular
cell will compute a value based on variable elements of a spreadsheet
as multiplied by undisclosed fixed elements.

Example: Assume a1,b1, c1 and d1 have variables. Also assume that the
fixed elements are fe1=.4,fe2=.25,fe3=.11,fe4=.24 stored in the
function I created called rating.

Thus, cell e1 =(function) rating(a1,b1,c1,d1) and yields the result of
(a1*fe1)+(b1*fe2)+(c1*fe3)+(d1*4).

Is there a way to hide the declaration of a function or must the
function be declared in another language where it MIGHT be more
secure? The use of another language would seem to raise issues like
impact on speed.

Is it possible to create the function and disable macros to conceal
the process to all but the most knowledgeable Excel users?

A newbie at writing macros, any help provided will be appreciated...



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hiding Formulas Looking for help today Excel Worksheet Functions 9 February 23rd 09 10:19 AM
HIDING FORMULAS zen Excel Discussion (Misc queries) 3 July 1st 08 09:25 PM
Hiding Formulas EG Excel Worksheet Functions 3 November 15th 06 05:24 PM
How do I use formulas and what is the secret to making them eericclaptonfan New Users to Excel 6 July 26th 06 05:51 PM
Hiding formulas Donald Excel Discussion (Misc queries) 5 December 14th 05 10:32 PM


All times are GMT +1. The time now is 04:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"