Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Right function variable length

I have a column of data that looks like:

54432\27982\UNIV 20080701

I am looking to remove everything to the right of the second \. The length
of those charaters is variable. I know this is an easy one but I can not
seem to get it to work.

Thanks for the help

Mike
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,722
Default Right function variable length

To extract everything to the right:
=RIGHT(A2,LEN(A2)-FIND("\",A2,FIND("\",A2)+1))
To get rid of everything to the right:
=LEFT(A2,FIND("\",A2,FIND("\",A2)+1))
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"lundquic" wrote:

I have a column of data that looks like:

54432\27982\UNIV 20080701

I am looking to remove everything to the right of the second \. The length
of those charaters is variable. I know this is an easy one but I can not
seem to get it to work.

Thanks for the help

Mike

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 73
Default Right function variable length

Assuming there is *always* 2 \ in the string:

=MID(A1,FIND("\",A1,FIND("\",A1)+1)+1,255)

--
Biff
Microsoft Excel MVP


"lundquic" wrote:

I have a column of data that looks like:

54432\27982\UNIV 20080701

I am looking to remove everything to the right of the second \. The length
of those charaters is variable. I know this is an easy one but I can not
seem to get it to work.

Thanks for the help

Mike

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 896
Default Right function variable length

=RIGHT(RIGHT(A1,LEN(A1)-FIND("\",A1,1)),LEN(RIGHT(A1,LEN(A1)-FIND
("\",A1,1)))-FIND("\",RIGHT(A1;LEN(A1)-FIND("\",A1,1)),1))

pls click YES if it helped you



On 27 Lut, 17:54, lundquic wrote:
I have a column of data that looks like:

54432\27982\UNIV 20080701

I am looking to remove everything to the right of the second \. *The length
of those charaters is variable. *I know this is an easy one but I can not
seem to get it to work.

Thanks for the help

Mike


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default Right function variable length

Mike,

=LEFT(A2,FIND("\",A2,FIND("\",A2)+1)-1)

or

=LEFT(A2,FIND("\",A2,FIND("\",A2)+1))

depending on whether you want the final \ or not.

HTH,
Bernie
MS Excel MVP


"lundquic" wrote in message
...
I have a column of data that looks like:

54432\27982\UNIV 20080701

I am looking to remove everything to the right of the second \. The
length
of those charaters is variable. I know this is an easy one but I can not
seem to get it to work.

Thanks for the help

Mike




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Right function variable length

On Fri, 27 Feb 2009 08:54:14 -0800, lundquic
wrote:

I have a column of data that looks like:

54432\27982\UNIV 20080701

I am looking to remove everything to the right of the second \. The length
of those charaters is variable. I know this is an easy one but I can not
seem to get it to work.

Thanks for the help

Mike


Will the 2nd "\" always be the last "\"? If so, try:

=TRIM(RIGHT(SUBSTITUTE(A1,"\",REPT(" ",99)),99))

--ron
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
Variable Axis Length Krys Charts and Charting in Excel 2 July 1st 08 08:19 PM
Return a Variable value length Sean Excel Worksheet Functions 5 December 4th 06 09:25 PM
Sum a Column of Variable length Chris G Excel Discussion (Misc queries) 4 November 7th 05 12:25 PM
Performing a function on a column of variable length BeenThereGotLost Excel Worksheet Functions 3 July 1st 05 02:50 PM
Sum a column of variable length? Brian Excel Discussion (Misc queries) 5 February 3rd 05 02:26 PM


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