ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Store Functions by a name (https://www.excelbanter.com/excel-worksheet-functions/65331-store-functions-name.html)

captain118

Store Functions by a name
 
I need to store a function by a name.
I am reusing these 5 functions and if I could store them in a name it
would help greatly.

Here is what I am doing:

'(And)
=IF(Location1="T",IF(Location2="T","T","F"),"F")

Would I make this into a macro?

How would I approach this?

Thanks,
Kirk


Ryan Poth

Store Functions by a name
 
Kirk,
You may not need to. If the functions you are trying to (re)create are as
simple as this "and" function, Excel has inbuilt functions to handle this.

For example, you could rewrite this formula as:
=IF(AND(Location1="T",Location2="T"),"T","F")

Alternaltively, if you replaced your "T"s and "F"s with TRUEs and FALSEs,
you could simply use:
=AND(Location1,Location2)

HTH,
Ryan

"captain118" wrote:

I need to store a function by a name.
I am reusing these 5 functions and if I could store them in a name it
would help greatly.

Here is what I am doing:

'(And)
=IF(Location1="T",IF(Location2="T","T","F"),"F")

Would I make this into a macro?

How would I approach this?

Thanks,
Kirk




All times are GMT +1. The time now is 02:05 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com