how to save personnel function results ?

kingman29

Board Regular
Joined
Jun 22, 2021
Messages
50
Office Version
  1. 2016
Platform
  1. Windows
Hello again
I created a personnel function
I have two problems
First one, that when I close the File, and oped it again, the function calculating the results
second one if i double click at any cell in the sheet and click enter I see that all cell witch contains the Function refreshing all the cells results
(Try to double click at any empty cell and move to another with one click, and focus in the cells witch have the function formulas, you will see that the function is refreshing after moving the click to another cell)

So
How make Excel file save the results ?
and how to stop the refreshing the functions when I double click the results
Excel File Example
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
The link to your Google Sheet requires access.

I don't know what you mean by "personal function". I first thought that you meant a VBA UDF, but Google sheets doesn't support that.
 
Upvote 0
Could you post the code?
VBA Code:
Option Explicit
Public Function puissance2(Taux_CPrincpal As Double) As Double
On Error Resume Next
Dim x As Double
     puissance2 = Taux_CPrincpal
       For x = 2 To 40
     puissance2 = (puissance2 + Application.Power(Taux_CPrincpal, x))
    Next x
End Function

Public Function deversement(ByVal Charge_Centre_Principal, ByVal Centre1 As String, ByVal Vlrange1 As Range, ByVal Vlcolone As Double, ByVal TauxCP As Double) As Double
On Error Resume Next

deversement = (Charge_Centre_Principal * Application.WorksheetFunction.VLookup(Centre1, Vlrange1, Vlcolone, 0)) * (-1 - puissance2(TauxCP))


End Function

Thank you
 
Upvote 0
It sounds like Excel is treating your UDF just like every other function. Calculate at close and the results in the sheet should be saved.
 
Upvote 0
It sounds like Excel is treating your UDF just like every other function. Calculate at close and the results in the sheet should be saved.
I will share another function (without VBA) the resuls never refresh if you double click on Empty cell and press Enter,
and it's save the results after closing
so in my function ,; It looping from the begining after double click on empty cell, so why the function refresh result if I do nothing *
I just double clock on empty cell and press enter,
do you understand me ?
download my file, double click on empty cell and press enter, you will see that D6:K14 will refressh itself
 
Upvote 0

Forum statistics

Threads
1,214,650
Messages
6,120,734
Members
448,987
Latest member
marion_davis

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