[mso] Re: Excel Formula

  • From: "Cedric Halforty" <halforty@xxxxxxxxxxxxxxxx>
  • To: <mso@xxxxxxxxxxxxx>
  • Date: Sat, 19 Feb 2005 03:11:00 +1100

Christine,

Try the following:

It looks like 2005 is the year and is therefore a fix length after the "-"

Use find("-",cell) to determine the position of the "-".  This will return a
number.  In your example, 6

Then use mid(cell,6+5,5)  [6 is the start position and 5 the offset, the
second 5 is the number of characters]

Are the characters between the two "-" a fixed length? 

Cedric

-----Original Message-----
From: mso-bounce@xxxxxxxxxxxxx [mailto:mso-bounce@xxxxxxxxxxxxx] On Behalf
Of McDonald, Christine, Ms, DCAA
Sent: 19 August, 2005 2:46 AM
To: mso@xxxxxxxxxxxxx
Subject: [mso] Excel Formula

I know I've done this before, but can't find the formula again.  I have
a column of data that I need to extract the 5 characters after the first
letter in cell.  So, for instance, if I have a cell that has
04421-2005B12345789-test I need to extract the 12345.  The data is not
the same length in each cell, so the text to columns or mid feature
won't work.
 
Any help is appreciated.
Thanks,
 

Christine McDonald, CPA
Technical Specialist
Western Regional Office
Information Technology Division (RSA-4)


 

*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, send an email to 
mso-request@xxxxxxxxxxxxx with the word "unsubscribe" (without the quotes)
in the subject line.

Or, visit the group's homepage and use the dropdown menu.  This will also
allow you to change your email settings to digest or vacation (no mail).
//www.freelists.org/webpage/mso

To be able to use the files section for sharing files with the group, send a
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation
with instructions.  Once you are a member of the files group, you can go
here to upload/download files:

http://www.smartgroups.com/vault/msofiles
*************************************************************

*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or 
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, send an email to 
mso-request@xxxxxxxxxxxxx with the word "unsubscribe" (without the quotes) in 
the subject line.

Or, visit the group's homepage and use the dropdown menu.  This will also allow 
you to change your email settings to digest or vacation (no mail).
//www.freelists.org/webpage/mso

To be able to use the files section for sharing files with the group, send a 
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation with 
instructions.  Once you are a member of the files group, you can go here to 
upload/download files:
http://www.smartgroups.com/vault/msofiles
*************************************************************

Other related posts: