ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Need a property that will give me true if a value is close (https://www.excelbanter.com/excel-programming/327447-re-need-property-will-give-me-true-if-value-close.html)

Bob Phillips[_6_]

Need a property that will give me true if a value is close
 
Like should do it. For Example

If Activecell.Value Like "*Price*" Then
....

--

HTH

RP
(remove nothere from the email address if mailing direct)


"havocdragon" wrote in message
...
Ok so heres what im saying:

Lets say I have a value in a cell "Price"

If I put a value of "If activecell = "Price" then"

This will be a valid statement and do what I tell it to afterwards.

However,
lets say the value in the cell is " Price" or "$Price" how would I

make a
statment saying something to the effect of "If activecell = similar to
"Price" then"





Jim Thomlinson[_3_]

Need a property that will give me true if a value is close
 
Haven't seen you in a few days. As always I am going to be difficult and ask
if one way is faster than the other... :-)

"Bob Phillips" wrote:

Like should do it. For Example

If Activecell.Value Like "*Price*" Then
....

--

HTH

RP
(remove nothere from the email address if mailing direct)


"havocdragon" wrote in message
...
Ok so heres what im saying:

Lets say I have a value in a cell "Price"

If I put a value of "If activecell = "Price" then"

This will be a valid statement and do what I tell it to afterwards.

However,
lets say the value in the cell is " Price" or "$Price" how would I

make a
statment saying something to the effect of "If activecell = similar to
"Price" then"






Bob Phillips[_6_]

Need a property that will give me true if a value is close
 
Hi Jim,

Been charging around France for the past ten days,, from the Northern ports,
to the High Alps, to the sunny South-West and back. Far too hectic to hit
the groups ...

In all my tests, as I expected, Instr tends to be faster, by about 2 times .
So where speed is important, Instr it is, but otherwise I think Like is more
intuitive, and reads better.

Regards

Bob

"Jim Thomlinson" wrote in message
...
Haven't seen you in a few days. As always I am going to be difficult and

ask
if one way is faster than the other... :-)

"Bob Phillips" wrote:

Like should do it. For Example

If Activecell.Value Like "*Price*" Then
....

--

HTH

RP
(remove nothere from the email address if mailing direct)


"havocdragon" wrote in message
...
Ok so heres what im saying:

Lets say I have a value in a cell "Price"

If I put a value of "If activecell = "Price" then"

This will be a valid statement and do what I tell it to afterwards.

However,
lets say the value in the cell is " Price" or "$Price" how would I

make a
statment saying something to the effect of "If activecell = similar to
"Price" then"









All times are GMT +1. The time now is 03:15 AM.

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