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


is there any way to extract whatever string is in a particular cell i
order to then compare that string with strings in cells in othe
ranges

--
cjsmith2
-----------------------------------------------------------------------
cjsmith22's Profile: http://www.excelforum.com/member.php...fo&userid=2852
View this thread: http://www.excelforum.com/showthread.php?threadid=48215

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,173
Default extracting a string from a cell

Something like this works comparing values in A1 and A2

Sub StrComp()
Dim myString As String
Dim ans As Boolean
myString = Range("A1").Value
ans = InStr(1, myString, Range("A2"))
MsgBox ans
End Sub

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk
HIS


"cjsmith22" wrote
in message ...

is there any way to extract whatever string is in a particular cell in
order to then compare that string with strings in cells in other
ranges?


--
cjsmith22
------------------------------------------------------------------------
cjsmith22's Profile:
http://www.excelforum.com/member.php...o&userid=28528
View this thread: http://www.excelforum.com/showthread...hreadid=482151



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
Extracting elements of a string cell PK Excel Worksheet Functions 11 February 11th 10 11:58 AM
Extracting Data from a string of text in a cell swalker Excel Worksheet Functions 4 August 7th 08 10:52 PM
Extracting a string Peter Rooney Excel Discussion (Misc queries) 5 June 20th 06 06:34 PM
Extracting from a text string AmyTaylor Excel Worksheet Functions 3 June 24th 05 01:34 PM
extracting string from value in cell solo_razor[_18_] Excel Programming 1 October 30th 03 10:55 AM


All times are GMT +1. The time now is 12:34 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"