VBA equaivalent of worksheet functions

Status
Not open for further replies.

andyandy12345

New Member
Joined
Feb 26, 2011
Messages
11
Hi, new to using excel VBA and struggling...

Is there a VBA equivalent to this formula?
=IF(ISNUMBER(FIND("mytext",A3)),"good","bad")

I have defined a range in VBA and need to create a VB module to do check the range for certain text and based on the result output the result to an offsett column on the same row eg offset(0, 25)

I have, now, worked out that the boolean ISNUMERIC() function will report false if there is not a number in the range being checked and am struggling to work out what the alternative to the worksheet functions are

I have been using the FIND() to look for "mytext" and xlpart, matchcase:=0 etc but cannot combine the boolean logic test with the text lookup.

Please help and show how simple it is if you understand what you are doing...

Thank you in advance
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Please do not post the same question multiple times. Questions of a duplicate nature will be locked or deleted, per the Posting Rules (especially points 21-23).

Any bumps, clarifications, or follow-ups should be posted back to the linked thread.
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,224,591
Messages
6,179,767
Members
452,940
Latest member
rootytrip

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top