Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 60
Default Defining a length

Hi,

I have this code which Rick helpfully supplied

Sub List()

Dim iRow As Long
Dim FirstRow As Long
Dim LastRow As Long

With Worksheets("EmailList")
FirstRow = 2
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row

For iRow = LastRow To FirstRow + 1 Step -1
If .Cells(iRow, "A").Value = .Cells(iRow - 1, "A").Value Then
With .Cells(iRow - 1, "B")
.NumberFormat = "@"
.Value = .Text & "," & .Offset(1, 0).Text
End With
.Rows(iRow).Delete
End If
Next iRow
End With
End Sub

This is excellent however i need now to be able to make the cell with the
list in (Column B) to not go over 250 Characters. If it does i need it to put
the remaining info in the cell below with the same code as in Column A.

Example.

A1 = 111
B1 = e-mail addresses

IF B1's character length goes over 250 i need the rest on the info to go
into B2 and the same code from A1 to be entered into A2.

Column A B
Row
1 111 character length
greater than 250
2 111 rest of characters that
would have been in B1
3 112 character length ok
4 113 character length ok

Following this I need a value entered at the start of every cell in column B.

It will be e-mail addresses in column B all seperated by a comma with no
spaces but i need to appear at the start of every cell in column
B that contains e-mail addresses.

Any help appreciated!

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
Defining a variable length area for output. JHB Excel Discussion (Misc queries) 2 August 5th 09 10:43 PM
Length that falls within a length interval? Igorin Excel Worksheet Functions 4 November 20th 08 06:10 PM
visual basic editor- defining length of a year wheefus Excel Programming 0 January 13th 08 03:57 PM
Validation length, Range length I think I need to rephrase the question Excel Discussion (Misc queries) 5 September 17th 07 06:29 AM
Defining the length of an array variably franzklammer Excel Programming 4 June 21st 06 11:14 AM


All times are GMT +1. The time now is 03:20 PM.

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"