View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Stuart[_5_] Stuart[_5_] is offline
external usenet poster
 
Posts: 413
Default Right & Split question

Ideally I need to test each cell as follows:

if the last 2 character are "m2" then copy it to col I, same row
and strip it from the 'found' cell.

Many similar checks to run, but if you would be kind enough
to example one, maybe I can solve those remaining

Regards.

----- Original Message -----
From: "Bob Phillips"
Newsgroups: microsoft.public.excel.programming
Sent: Saturday, February 28, 2004 4:38 PM
Subject: Right & Split question


What is the question?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)


"Bob Phillips" wrote in message
...

"Stuart" wrote in message
...
I sample cells in col E, for data that ends as "m2":
Because I do not know this data. I look for the
last 2 characters:

Dim C As Range, x As Variant

With ActiveSheet
For Each C In Intersect(Range("E:E"), ActiveSheet.UsedRange)
If Right(C, 2) = "m2" Then
x = Split(C, " ")
'do my stuff
End If
Next
End With

Help please.

Regards.



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.596 / Virus Database: 379 - Release Date: 26/02/2004






---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.596 / Virus Database: 379 - Release Date: 26/02/2004