# How to create a new function.

#### Jeffrey Hendriks

##### New Member
I know. This is a simple question. But I forgot. And I don't have the time to look it up in a book.

Anyone know how to add a new function. I need to write one to calculate Fahrenheit to Celsius. But I don't know how/where to add the new function.

### Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
The Convert function from the Analysis toolpak will do this (you may need to add it in via Tools-Add-ins). eg

=CONVERT(A1,"F","C")

The Convert function from the Analysis toolpak will do this (you may need to add it in via Tools-Add-ins). eg

=CONVERT(A1,"F","C")

Thankyou for pointing that out, but I need to create this function myself. I am not allowed to use an existing function. Any idea how to add my own custom function?

your formula to convert fahrenheit to celcius is:

(fahrenheit - 32) / (9 / 5)

and celcius to fahrenheit is:

(celcius * (5 / 9)) + 32

so if A1 houses a fahrenheit temp, convert it w/ this formula:

=(A1-32)/(9/5)

and if A1 houses a celcius temp, convert it w/ this formula:

=A1*(9/5)+32

Replies
6
Views
192
Replies
10
Views
235
Replies
7
Views
400
Replies
1
Views
125
Replies
4
Views
315

1,219,972
Messages
6,151,224
Members
451,018
Latest member
dids86

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