Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 . |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 . . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|