![]() |
Replace(ActiveCell.Formula, "Round(","") not working as expected
2003
ActiveCell.Formula is =ROUND('1106'!C160,0) I am attempting to remove "Round(" then in a second step remove or truncate the ",0)". What I am after is the sheet and cell reference without the round function in the mix. The challenge is that: CellRef = Replace(ActiveCell.Formula, "Round(", "") does not replace "Round(". my guess is that XL does not want to remove "Round" as a function or Replace only works for one character? CellRef = Replace(ActiveCell.Formula, "R", "") works fine. What is the issue that I am missing and/or what is the best solution? TIA EagleOne |
Replace(ActiveCell.Formula, "Round(","") not working as expected
The Replace function is case sensitive.
-- Jim "Dennis" wrote in message oups.com... | 2003 | | ActiveCell.Formula is =ROUND('1106'!C160,0) | | I am attempting to remove "Round(" then in a second step | remove or truncate the ",0)". What I am after is the sheet and cell | reference | without the round function in the mix. | | The challenge is that: | CellRef = Replace(ActiveCell.Formula, "Round(", "") does not replace | "Round(". | my guess is that XL does not want to remove "Round" as a function or | Replace only works for one character? | | CellRef = Replace(ActiveCell.Formula, "R", "") works fine. | | What is the issue that I am missing and/or what is the best solution? | | TIA | | EagleOne | |
Replace(ActiveCell.Formula, "Round(","") not working as expected
I should have remenbered that! Thanks Jim
EagleOne On May 16, 9:54 am, "Jim Rech" wrote: The Replace function is case sensitive. -- Jim"Dennis" wrote in message oups.com... | 2003 | | ActiveCell.Formula is =ROUND('1106'!C160,0) | | I am attempting to remove "Round(" then in a second step | remove or truncate the ",0)". What I am after is the sheet and cell | reference | without the round function in the mix. | | The challenge is that: | CellRef = Replace(ActiveCell.Formula, "Round(", "") does not replace | "Round(". | my guess is that XL does not want to remove "Round" as a function or | Replace only works for one character? | | CellRef = Replace(ActiveCell.Formula, "R", "") works fine. | | What is the issue that I am missing and/or what is the best solution? | | TIA | | EagleOne | |
Replace(ActiveCell.Formula, "Round(","") not working as expected
But there is a matchcase parm in the replace() method.
Jim Rech wrote: The Replace function is case sensitive. -- Jim "Dennis" wrote in message oups.com... | 2003 | | ActiveCell.Formula is =ROUND('1106'!C160,0) | | I am attempting to remove "Round(" then in a second step | remove or truncate the ",0)". What I am after is the sheet and cell | reference | without the round function in the mix. | | The challenge is that: | CellRef = Replace(ActiveCell.Formula, "Round(", "") does not replace | "Round(". | my guess is that XL does not want to remove "Round" as a function or | Replace only works for one character? | | CellRef = Replace(ActiveCell.Formula, "R", "") works fine. | | What is the issue that I am missing and/or what is the best solution? | | TIA | | EagleOne | -- Dave Peterson |
All times are GMT +1. The time now is 07:13 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com