PC Review


Reply
Thread Tools Rate Thread

Add line and text

 
 
jln via OfficeKB.com
Guest
Posts: n/a
 
      15th Nov 2006
I need to create code to place text 2 lines below the total. The total line
is one space below the data. I never know how many lines will be used as
this changes each month and for each file.
The text needs to go into clomun E.
Sched Prin
curt prin
int on curt
net sched int
prepayment penalty
losses and recoveries
stop advances
misc remit adjust

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200611/1

 
Reply With Quote
 
 
 
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      15th Nov 2006
Assume you mean two blank rows, then the text:

With cells(rows.count,"E").End(xlup)(4)

.Value = _
"Sched Prin" & chr(10) & "curt prin" & chr(10) & _
"int on curt" & chr(10) & "net sched int" & chr(10) & _
"prepayment penalty" & chr(10) & "losses and recoveries" & _
chr(10) & "stop advances" & chr(10) & _
"misc remit adjust"
.WrapText = True
.EntireRow.Autofit
End With

--
Regards,
Tom Ogilvy

"jln via OfficeKB.com" wrote:

> I need to create code to place text 2 lines below the total. The total line
> is one space below the data. I never know how many lines will be used as
> this changes each month and for each file.
> The text needs to go into clomun E.
> Sched Prin
> curt prin
> int on curt
> net sched int
> prepayment penalty
> losses and recoveries
> stop advances
> misc remit adjust
>
> --
> Message posted via OfficeKB.com
> http://www.officekb.com/Uwe/Forums.a...mming/200611/1
>
>

 
Reply With Quote
 
jln via OfficeKB.com
Guest
Posts: n/a
 
      15th Nov 2006
Im sorry tom i need each them to go into their own cell.

Tom Ogilvy wrote:
>Assume you mean two blank rows, then the text:
>
>With cells(rows.count,"E").End(xlup)(4)
>
> .Value = _
>"Sched Prin" & chr(10) & "curt prin" & chr(10) & _
>"int on curt" & chr(10) & "net sched int" & chr(10) & _
>"prepayment penalty" & chr(10) & "losses and recoveries" & _
>chr(10) & "stop advances" & chr(10) & _
>"misc remit adjust"
> .WrapText = True
> .EntireRow.Autofit
>End With
>
>> I need to create code to place text 2 lines below the total. The total line
>> is one space below the data. I never know how many lines will be used as

>[quoted text clipped - 8 lines]
>> stop advances
>> misc remit adjust


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200611/1

 
Reply With Quote
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      15th Nov 2006
Sub ABC()

With Cells(Rows.Count, "E").End(xlUp)(4)

.Resize(8, 1).Value = _
Application.Transpose(Split( _
"Sched Prin" & Chr(10) & _
"curt prin" & Chr(10) & _
"int on curt" & Chr(10) & _
"net sched int" & Chr(10) & _
"prepayment penalty" & Chr(10) & _
"losses and recoveries" & Chr(10) & _
"stop advances" & Chr(10) & _
"misc remit adjust", Chr(10)))
End With
End Sub

--
Regards,
Tom Ogilvy


"Tom Ogilvy" wrote:

> Assume you mean two blank rows, then the text:
>
> With cells(rows.count,"E").End(xlup)(4)
>
> .Value = _
> "Sched Prin" & chr(10) & "curt prin" & chr(10) & _
> "int on curt" & chr(10) & "net sched int" & chr(10) & _
> "prepayment penalty" & chr(10) & "losses and recoveries" & _
> chr(10) & "stop advances" & chr(10) & _
> "misc remit adjust"
> .WrapText = True
> .EntireRow.Autofit
> End With
>
> --
> Regards,
> Tom Ogilvy
>
> "jln via OfficeKB.com" wrote:
>
> > I need to create code to place text 2 lines below the total. The total line
> > is one space below the data. I never know how many lines will be used as
> > this changes each month and for each file.
> > The text needs to go into clomun E.
> > Sched Prin
> > curt prin
> > int on curt
> > net sched int
> > prepayment penalty
> > losses and recoveries
> > stop advances
> > misc remit adjust
> >
> > --
> > Message posted via OfficeKB.com
> > http://www.officekb.com/Uwe/Forums.a...mming/200611/1
> >
> >

 
Reply With Quote
 
jln via OfficeKB.com
Guest
Posts: n/a
 
      16th Nov 2006
Thanks again Tom for the help.

Tom Ogilvy wrote:
>Sub ABC()
>
>With Cells(Rows.Count, "E").End(xlUp)(4)
>
> .Resize(8, 1).Value = _
>Application.Transpose(Split( _
> "Sched Prin" & Chr(10) & _
> "curt prin" & Chr(10) & _
> "int on curt" & Chr(10) & _
> "net sched int" & Chr(10) & _
> "prepayment penalty" & Chr(10) & _
> "losses and recoveries" & Chr(10) & _
> "stop advances" & Chr(10) & _
> "misc remit adjust", Chr(10)))
>End With
>End Sub
>
>> Assume you mean two blank rows, then the text:
>>

>[quoted text clipped - 22 lines]
>> > stop advances
>> > misc remit adjust


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200611/1

 
Reply With Quote
 
Dana DeLouis
Guest
Posts: n/a
 
      16th Nov 2006
Here's a slight variation on Tom's excellent idea:

Sub Demo()
Dim M As Variant
M = Array( _
"Sched Prin", _
"Curt Prin", _
"Int on Curt", _
"Net Sched Int", _
"Prepayment Penalty", _
"Losses and Recoveries", _
"Stop Advances", _
"Misc Remit Adjust")

Cells(Rows.Count, "E").End(xlUp)(4). _
Resize(UBound(M) + 1) = WorksheetFunction.Transpose(M)

End Sub

--
HTH :>)
Dana DeLouis
Windows XP & Office 2003


"jln via OfficeKB.com" <u25956@uwe> wrote in message
news:6954f3d7ca848@uwe...
> Im sorry tom i need each them to go into their own cell.
>
> Tom Ogilvy wrote:
>>Assume you mean two blank rows, then the text:
>>
>>With cells(rows.count,"E").End(xlup)(4)
>>
>> .Value = _
>>"Sched Prin" & chr(10) & "curt prin" & chr(10) & _
>>"int on curt" & chr(10) & "net sched int" & chr(10) & _
>>"prepayment penalty" & chr(10) & "losses and recoveries" & _
>>chr(10) & "stop advances" & chr(10) & _
>>"misc remit adjust"
>> .WrapText = True
>> .EntireRow.Autofit
>>End With
>>
>>> I need to create code to place text 2 lines below the total. The total
>>> line
>>> is one space below the data. I never know how many lines will be used
>>> as

>>[quoted text clipped - 8 lines]
>>> stop advances
>>> misc remit adjust

>
> --
> Message posted via OfficeKB.com
> http://www.officekb.com/Uwe/Forums.a...mming/200611/1
>



 
Reply With Quote
 
jln via OfficeKB.com
Guest
Posts: n/a
 
      16th Nov 2006
Tom what would be the best way to theses 3 appear with red text?

"losses and recoveries"
"stop advances"
"misc remit adjust"


Tom Ogilvy wrote:
>Sub ABC()
>
>With Cells(Rows.Count, "E").End(xlUp)(4)
>
> .Resize(8, 1).Value = _
>Application.Transpose(Split( _
> "Sched Prin" & Chr(10) & _
> "curt prin" & Chr(10) & _
> "int on curt" & Chr(10) & _
> "net sched int" & Chr(10) & _
> "prepayment penalty" & Chr(10) & _
> "losses and recoveries" & Chr(10) & _
> "stop advances" & Chr(10) & _
> "misc remit adjust", Chr(10)))
>End With
>End Sub
>
>> Assume you mean two blank rows, then the text:
>>

>[quoted text clipped - 22 lines]
>> > stop advances
>> > misc remit adjust


--
Message posted via http://www.officekb.com

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to store/read listbox items in a text file line by line (with line break) ? kimiraikkonen Microsoft VB .NET 6 2nd Nov 2007 05:27 PM
Preserving Line breaks when importing text into multi line text boxes. One Handed Man [ OHM ] Microsoft Access 3 15th Sep 2003 04:15 PM
Preserving Line breaks when importing text into multi line text boxes. One Handed Man [ OHM ] Microsoft Access Form Coding 1 15th Sep 2003 04:15 PM
Preserving Line breaks when importing text into multi line text boxes. One Handed Man [ OHM ] Microsoft Access External Data 3 15th Sep 2003 04:15 PM
Preserving Line breaks when importing text into multi line text boxes. One Handed Man [ OHM ] Microsoft Access Queries 1 15th Sep 2003 04:15 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:54 PM.