right
Hello,
Is it possible to tell what the right 3 characters in a formula are I am familiar with =Right(a1,3) but how do I get this to work with the formula in the cell not the value that ends up in the cell |
right
builtin worksheetfunctions can't work with the formula in a cell. You would
need to write a UDF in VBA. -- Regards, Tom Ogilvy wrote in message ... Hello, Is it possible to tell what the right 3 characters in a formula are I am familiar with =Right(a1,3) but how do I get this to work with the formula in the cell not the value that ends up in the cell |
right
Hi Tom
though I wouldn't use the following approach (and would prefer a VBA solution) it is possible without VBA :-) So just for the fun of it the OP may try the following: - lets assume you are on sheet1 - your formula is in cell A1 Try the following: - select cell B1 - goto 'Insert - Name - Define' - use the name 'formula' for example and as 'refert to' enter the following formula: =GET.CELL(6,sheet1!A1) Now enter in cell B1: =Right(formula,3) -- Regards Frank Kabel Frankfurt, Germany "Tom Ogilvy" schrieb im Newsbeitrag ... builtin worksheetfunctions can't work with the formula in a cell. You would need to write a UDF in VBA. -- Regards, Tom Ogilvy wrote in message ... Hello, Is it possible to tell what the right 3 characters in a formula are I am familiar with =Right(a1,3) but how do I get this to work with the formula in the cell not the value that ends up in the cell |
right
Hi;
You can use MyRightOfTheFormula = Right(ActiveCell.Formula, 3) Thanks, Greg -----Original Message----- Hello, Is it possible to tell what the right 3 characters in a formula are I am familiar with =Right(a1,3) but how do I get this to work with the formula in the cell not the value that ends up in the cell . |
right
Now copy the cell with the formula and paste it on another sheet. In xl2000
and earlier, you get a message box and when clicked, a general protection fault, excel closes and all changes are lost. I think xl2002 is more resiliant,.. -- Regards, Tom Ogilvy "Frank Kabel" wrote in message ... Hi Tom though I wouldn't use the following approach (and would prefer a VBA solution) it is possible without VBA :-) So just for the fun of it the OP may try the following: - lets assume you are on sheet1 - your formula is in cell A1 Try the following: - select cell B1 - goto 'Insert - Name - Define' - use the name 'formula' for example and as 'refert to' enter the following formula: =GET.CELL(6,sheet1!A1) Now enter in cell B1: =Right(formula,3) -- Regards Frank Kabel Frankfurt, Germany "Tom Ogilvy" schrieb im Newsbeitrag ... builtin worksheetfunctions can't work with the formula in a cell. You would need to write a UDF in VBA. -- Regards, Tom Ogilvy wrote in message ... Hello, Is it possible to tell what the right 3 characters in a formula are I am familiar with =Right(a1,3) but how do I get this to work with the formula in the cell not the value that ends up in the cell |
right
Hi Tom
I know :-) this is why I wouldn't recommend this usage (sorry, forgot to add the explanation for it). And you're right. At least Excel 2003 has no problems with copying this formula. -- Regards Frank Kabel Frankfurt, Germany "Tom Ogilvy" schrieb im Newsbeitrag ... Now copy the cell with the formula and paste it on another sheet. In xl2000 and earlier, you get a message box and when clicked, a general protection fault, excel closes and all changes are lost. I think xl2002 is more resiliant,.. -- Regards, Tom Ogilvy "Frank Kabel" wrote in message ... Hi Tom though I wouldn't use the following approach (and would prefer a VBA solution) it is possible without VBA :-) So just for the fun of it the OP may try the following: - lets assume you are on sheet1 - your formula is in cell A1 Try the following: - select cell B1 - goto 'Insert - Name - Define' - use the name 'formula' for example and as 'refert to' enter the following formula: =GET.CELL(6,sheet1!A1) Now enter in cell B1: =Right(formula,3) -- Regards Frank Kabel Frankfurt, Germany "Tom Ogilvy" schrieb im Newsbeitrag ... builtin worksheetfunctions can't work with the formula in a cell. You would need to write a UDF in VBA. -- Regards, Tom Ogilvy wrote in message ... Hello, Is it possible to tell what the right 3 characters in a formula are I am familiar with =Right(a1,3) but how do I get this to work with the formula in the cell not the value that ends up in the cell |
right
Thank You
-----Original Message----- Hi; You can use MyRightOfTheFormula = Right(ActiveCell.Formula, 3) Thanks, Greg -----Original Message----- Hello, Is it possible to tell what the right 3 characters in a formula are I am familiar with =Right(a1,3) but how do I get this to work with the formula in the cell not the value that ends up in the cell . . |
All times are GMT +1. The time now is 03:18 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com