#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Text to columns

I have a column and all I need is the last 5 characters in this field.
Problem is that this field has various text lengths. How can I get the last
5 characters and delete the rest. My spreadsheet has 1,000 or so lines.

This Column looks like this:

AESGROUPGR123
AESGROUPGR457
AESGROUPGR236
SECTIOGR046
MSGTYHSYHSYHGR123
MSGTYHSYYHGR123

My first thought was to make ths column flush right in Text to columns, but
I do not see that making it flush right is an option. Ideas?

Thanks.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,101
Default Text to columns

Maybe you could use a helper column and use this formula
Change A1 what you need and the 5 is for the first 5 characters from the
right.
=RIGHT(A1,5)

"Allan Fischler" wrote:

I have a column and all I need is the last 5 characters in this field.
Problem is that this field has various text lengths. How can I get the last
5 characters and delete the rest. My spreadsheet has 1,000 or so lines.

This Column looks like this:

AESGROUPGR123
AESGROUPGR457
AESGROUPGR236
SECTIOGR046
MSGTYHSYHSYHGR123
MSGTYHSYYHGR123

My first thought was to make ths column flush right in Text to columns, but
I do not see that making it flush right is an option. Ideas?

Thanks.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 638
Default Text to columns

On Oct 8, 8:21 pm, Allan Fischler wrote:
I have a column and all I need is the last 5 characters in this field.
Problem is that this field has various text lengths. How can I get the last
5 characters and delete the rest. My spreadsheet has 1,000 or so lines.

This Column looks like this:

AESGROUPGR123
AESGROUPGR457
AESGROUPGR236
SECTIOGR046
MSGTYHSYHSYHGR123
MSGTYHSYYHGR123

My first thought was to make ths column flush right in Text to columns, but
I do not see that making it flush right is an option. Ideas?

Thanks.


Can you just use a right formula?
=RIGHT(A2,5)

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,101
Default Text to columns

You could use VBA code to get the results your looking for
AESGROUPGR123 will be GR123
AESGROUPGR457 will be GR457

Sub fivecharacters()
lastcell = Cells(Rows.Count, "A").End(xlUp).Row
For i = 1 To lastcell
Range("A" & i).Value = Right(Range("A" & i).Value, 5)
Next
End Sub

"Allan Fischler" wrote:

I have a column and all I need is the last 5 characters in this field.
Problem is that this field has various text lengths. How can I get the last
5 characters and delete the rest. My spreadsheet has 1,000 or so lines.

This Column looks like this:

AESGROUPGR123
AESGROUPGR457
AESGROUPGR236
SECTIOGR046
MSGTYHSYHSYHGR123
MSGTYHSYYHGR123

My first thought was to make ths column flush right in Text to columns, but
I do not see that making it flush right is an option. Ideas?

Thanks.


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
Combining Text from 2 Columns into 1 then Deleting the 2 Columns sleepindogg Excel Worksheet Functions 5 September 19th 08 12:36 AM
help with sorting text in columns to match other columns rkat Excel Discussion (Misc queries) 1 August 11th 06 03:42 AM
merge text from 2 columns into 1 then delete the old 2 columns sleepindogg Excel Worksheet Functions 4 March 30th 06 07:25 PM
Excel is automatically doing "text to columns" upon paste text. robert10000 Excel Discussion (Misc queries) 1 June 15th 05 07:49 PM
Linking text columns with text and data columns Edd Excel Worksheet Functions 0 March 17th 05 04:23 PM


All times are GMT +1. The time now is 07:37 AM.

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

About Us

"It's about Microsoft Excel"