Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Put a formula in another cell

Status
Not open for further replies.

shahyar

Chemical
Feb 15, 2005
216
Hi,
Is there a way to put a formula (or number) from a formula/function in another cell?
eg. a function in cell A1 produce a formula in cell B1.

Thanks
 
Replies continue below

Recommended for you

Just use '=A1' (without the quotes) in B1

Good Luck
johnwm
________________________________________________________
To get the best from these forums read faq731-376 before posting

UK steam enthusiasts:
 
:)
I want to do that without putting anything in B1.
 
I don't understand the question.
first_post said:
...a function in cell A1 produce a formula in cell B1
second_post said:
I want to do that without putting anything in B1.
Could you clarify what you want to calculate and what you want to see. If you just want to hide something then use Format|Cells|protection and check Hidden and Locked, then Use Format|Cells|Font and set the colour to the same as the cell background

Sorry I seem to be a bit dense today [smile]

Good Luck
johnwm
________________________________________________________
To get the best from these forums read faq731-376 before posting

UK steam enthusiasts:
 
You place the method in VBA such as the following:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.AddressLocal = "$A$1" Then
Target.Formula = [B1] * [C1]
End If
End Sub
 
And me being "dense" too - what's the point of all this - why not just put the formula in cell B1?
 
FalsePrecision,
The method I showed utilizing VBA for the equation is a method I use for calculation spreadsheets I sell on the net. Excel is not a "secure" environment.

For normal use - I agree its not worth the trouble.
 
In what way is VBA more secure than the spreadsheet it lives in?

Good Luck
johnwm
________________________________________________________
To get the best from these forums read faq731-376 before posting

UK steam enthusiasts:
 
johnwm,
VBA is tougher to break when protected, where Excel's standard protection scheme at the sheet level can worked around in seconds with programs readily available on the web.
 
Excel's "protection....can worked around in seconds"

VBA's vastly improve protection scheme, on the other hand, may require almost an entire minute to bypass.

 
When I made that posting, it was intended to be a general comment on the essential uselessness of such 'protection' schemes. Upon further Googleing, I find that my assumption is correct even in this specific case.

I'm not going to violate the US DMCA by providing any specifics, but bypasses are readily available (just as I assumed they would be). Google it.

To be honest, it looks like it might actually take about 10 minutes (including download time by dial-up).

 
psafety,
My question was rhetorical - there is no realistic protection in a standard Excel spreadsheet, whether in code or on the sheet. If you want any reasonable level of protection for your intellectual property you need a fully compiled application.

Good Luck
johnwm
________________________________________________________
To get the best from these forums read faq731-376 before posting

UK steam enthusiasts:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor