Adding text

G

gav meredith

Hi,

With the following code, how would i amend it to insert text "Less Trade
In'? Can i adjust the font??

Thank you!!
 
J

John Green

I don't see any code, but you can add text to a cell and change the font with something like:

ActiveCell.Value = "Less Trade In"
With ActiveCell.Font
.Name = "Times New Roman"
.Size = 10
End With
 
G

gav meredith

oops, sorry John. Here you go!!

Sub test()
If Worksheets("Sheet1").Range("A1").Value > 1 Then
Worksheets("Sheet2").Range("31:32").Insert xlShiftDown
End If
End Sub

Thank you!
 
J

John Green

Add the code I provided after your code, but change ActiveCell to refer to the cell you want the trext in. Presumably youwant
something like:

Range("A31").Value = "Less Trade In"
With Range("A31").Font
.Name = "Times New Roman"
.Size = 10
End With
 
G

gav meredith

John,

rather than assign a particular row to insert at, can i ditermine this via a
target method. IE: 5 rows after 'REQUIRED INVESTMENT', insert 2 rows??
This is the code i am using to ditermine a target to copy and paste? Along
these lines???


Private Sub Commandbutton2_click()
CopyData Range("E9:E94"), "OPTIONS"
End Sub





John Green said:
Add the code I provided after your code, but change ActiveCell to refer to
the cell you want the trext in. Presumably youwant
 
Top