ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Adding text (https://www.excelbanter.com/excel-programming/294522-adding-text.html)

gav meredith

Adding text
 
Hi,

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

Thank you!!



John Green[_3_]

Adding text
 
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

--

John Green - Excel MVP
Sydney
Australia


"gav meredith" wrote in message ...
Hi,

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

Thank you!!





gav meredith

Adding text
 
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!

"John Green" wrote in message
...
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

--

John Green - Excel MVP
Sydney
Australia


"gav meredith" wrote in message

...
Hi,

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

Thank you!!







John Green[_3_]

Adding text
 
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


--

John Green - Excel MVP
Sydney
Australia


"gav meredith" wrote in message ...
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!

"John Green" wrote in message
...
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

--

John Green - Excel MVP
Sydney
Australia


"gav meredith" wrote in message

...
Hi,

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

Thank you!!









gav meredith

Adding text
 
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" wrote in message
...
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


--

John Green - Excel MVP
Sydney
Australia


"gav meredith" wrote in message

...
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!

"John Green" wrote in message
...
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

--

John Green - Excel MVP
Sydney
Australia


"gav meredith" wrote in message

...
Hi,

With the following code, how would i amend it to insert text "Less

Trade
In'? Can i adjust the font??

Thank you!!












All times are GMT +1. The time now is 12:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com