I wasnt sure how to name this problem, but here goes.
Option Explicit
Sub Macro_Insert()
'
ActiveCell = ActiveCell & MyInputBox
With ActiveCell.Characters(Start:=1, Length:=19).Font
.Name = "Arial"
.FontStyle = "Regular"
.Size = 12
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
With ActiveCell.Characters(Start:=20, Length:=5).Font
.Name = "Arial"
.FontStyle = "Bold"
.Size = 12
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
End Sub
Function MyInputBox() As String
While MyInputBox = "Enter your input text HERE" Or MyInputBox = ""
MyInputBox = InputBox("This is my InputBox", "MyInputTitle", "Enter your input text HERE")
Wend
End Function
The code above takes the value of a cell in on my worksheet and adds a further value ontop of it.
The problem - I need to be able to use this formula on the rows numbered 5 by selecting only the column needed.
Example;Column B is selected. When I activate the macro it will effect B5.
Column CD is selected. When I activate it will effect CD5.
And so on.
Thanks in Advance!
Bookmarks