ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Replace Return (https://www.excelbanter.com/excel-programming/359832-replace-return.html)

Trent Argante

Replace Return
 
How do I get the Replace method to return a boolean of whether it has
replaced values or not? It's default return value only seems to indicate
that there are chacters present in the target range or not, but not whether
it made a replacement or not.
Getting frazzeled,
Trent Argante
[DC.J(455)]

Dave Peterson

Replace Return
 
Maybe do a find first to see if the value is in the range to start.



Trent Argante wrote:

How do I get the Replace method to return a boolean of whether it has
replaced values or not? It's default return value only seems to indicate
that there are chacters present in the target range or not, but not whether
it made a replacement or not.
Getting frazzeled,
Trent Argante
[DC.J(455)]


--

Dave Peterson

Trent Argante

Replace Return
 
Good idea, thanks, Dave.
--
Trent Argante
[DC.J(455)]


"Dave Peterson" wrote:

Maybe do a find first to see if the value is in the range to start.



Trent Argante wrote:

How do I get the Replace method to return a boolean of whether it has
replaced values or not? It's default return value only seems to indicate
that there are chacters present in the target range or not, but not whether
it made a replacement or not.
Getting frazzeled,
Trent Argante
[DC.J(455)]


--

Dave Peterson



All times are GMT +1. The time now is 05:31 PM.

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