Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default string manipulation

Dear Friends,

does anyone has any piece of code that returns true is string
contains string B and false otherwise?

Thank you in advance.


--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 109
Default string manipulation

Have a look at the INSTR() function.

--
Best Regards
Leo Heuser

Followup to newsgroup only please.

"banavas " skrev i en meddelelse
...
Dear Friends,

does anyone has any piece of code that returns true is string A
contains string B and false otherwise?

Thank you in advance.
G


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default string manipulation

Take a look at the InStr method in VBA Help. You can return True/False
with:

Dim bAcontainsB As Boolean
bAcontainsB = InStr(strA, strB) 0


In article ,
banavas wrote:

Dear Friends,

does anyone has any piece of code that returns true is string A
contains string B and false otherwise?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
String Manipulation within VBA BillCPA Excel Discussion (Misc queries) 2 December 6th 06 05:29 PM
String Manipulation String Manipulation Excel Discussion (Misc queries) 3 November 30th 05 11:51 PM
VBA String manipulation Frank Kabel Excel Programming 2 March 5th 04 07:19 AM
VBA String manipulation Chip Pearson Excel Programming 0 March 4th 04 11:02 PM
string manipulation Craig[_8_] Excel Programming 2 January 7th 04 05:00 AM


All times are GMT +1. The time now is 07:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"