Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15
Default Address can not be more than 30 characters

Hello,
I have a report that is opened through excel and it includes an address
column. I am sending this report to a thrid party who can not have the
address field be more than 30 characters. Is there a formula that would
recognize if the field is more than 30 characters and then move the extra
characters to the next column? the report includes over 1,000 records so it
would be nice if I did not have to do any manual work.

Thank you,
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 772
Default Address can not be more than 30 characters

It all depends on where you are allowed to strip characters from. If you just
want the first 30 then insert a column and type =Left(A1,30) copy it down and
there you go. You can copy and paste special-values over the old and delete
the column if you need to. This assumes that the address is in A1 btw.
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"NeSchw6G" wrote:

Hello,
I have a report that is opened through excel and it includes an address
column. I am sending this report to a thrid party who can not have the
address field be more than 30 characters. Is there a formula that would
recognize if the field is more than 30 characters and then move the extra
characters to the next column? the report includes over 1,000 records so it
would be nice if I did not have to do any manual work.

Thank you,

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15
Default Address can not be more than 30 characters

Okay, so now that I can identify the address with 30 characters, how do I
moved the 31+ characters to a separte column?

"John Bundy" wrote:

It all depends on where you are allowed to strip characters from. If you just
want the first 30 then insert a column and type =Left(A1,30) copy it down and
there you go. You can copy and paste special-values over the old and delete
the column if you need to. This assumes that the address is in A1 btw.
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"NeSchw6G" wrote:

Hello,
I have a report that is opened through excel and it includes an address
column. I am sending this report to a thrid party who can not have the
address field be more than 30 characters. Is there a formula that would
recognize if the field is more than 30 characters and then move the extra
characters to the next column? the report includes over 1,000 records so it
would be nice if I did not have to do any manual work.

Thank you,

  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default Address can not be more than 30 characters

Sub limitcol()
mc = "J"
On Error Resume Next
lr = Cells(Rows.Count, mc).End(xlUp).Row
For Each c In Range(Cells(1, mc), Cells(lr, mc))
c.Offset(, 1) = Right(c, Len(c) - 30)
c.Value = Left(c, 30)
Next c
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"NeSchw6G" wrote in message
...
Hello,
I have a report that is opened through excel and it includes an address
column. I am sending this report to a thrid party who can not have the
address field be more than 30 characters. Is there a formula that would
recognize if the field is more than 30 characters and then move the extra
characters to the next column? the report includes over 1,000 records so
it
would be nice if I did not have to do any manual work.

Thank you,


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15
Default Address can not be more than 30 characters

Don, It looks like you have a good idea except that I have no idea what "Sub
limitcol()" means, so I don't know how to execute this. Can you simplify for
me?

Thank you!

"Don Guillett" wrote:

Sub limitcol()
mc = "J"
On Error Resume Next
lr = Cells(Rows.Count, mc).End(xlUp).Row
For Each c In Range(Cells(1, mc), Cells(lr, mc))
c.Offset(, 1) = Right(c, Len(c) - 30)
c.Value = Left(c, 30)
Next c
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"NeSchw6G" wrote in message
...
Hello,
I have a report that is opened through excel and it includes an address
column. I am sending this report to a thrid party who can not have the
address field be more than 30 characters. Is there a formula that would
recognize if the field is more than 30 characters and then move the extra
characters to the next column? the report includes over 1,000 records so
it
would be nice if I did not have to do any manual work.

Thank you,



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
How do I avoid excel change absolute address to relative address Miguel Excel Discussion (Misc queries) 3 May 10th 07 11:18 PM
In Excel find characters when multiple characters exist w/i a cel teacher-deburg Excel Worksheet Functions 1 December 5th 05 10:22 PM
long address list, name-address-city, listed vertically, how do y. kb Excel Discussion (Misc queries) 2 March 4th 05 12:48 AM
How do I import Office address book to Outlook Express address bo. snnorp Excel Discussion (Misc queries) 2 February 22nd 05 11:47 AM
Using =address to provide address location for =average ahills Excel Worksheet Functions 2 November 30th 04 03:10 AM


All times are GMT +1. The time now is 03:06 AM.

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"