Copying and Pasting a value into a Range

Donal28

Well-known Member
Joined
Apr 23, 2010
Messages
527
Hi All

I,m trying to copy and past a value into a range with the macro below but at the moment I am just getting the value that is hard-coded into the range. Is there a way I can copy a value i.e a date from cell H1 and paste it into the range (H3:H4000) instead of having to hardcode the value each time?


Range("H3").Select
ActiveCell.FormulaR1C1 = "11/2/2011"
With ActiveCell.Characters(Start:=1, Length:=10).Font
.Name = "Arial"
.FontStyle = "Regular"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
.TintAndShade = 0
.ThemeFont = xlThemeFontNone
End With
Range("H3").Select
Selection.AutoFill Destination:=Range("H3:H4000"), Type:=xlFillCopy
Range("H3:H4000").Select
ActiveWindow.ScrollRow = 2575
ActiveWindow.ScrollRow = 2564
ActiveWindow.ScrollRow = 2529
ActiveWindow.ScrollRow = 2380
ActiveWindow.ScrollRow = 2081
ActiveWindow.ScrollRow = 1792
ActiveWindow.ScrollRow = 1535
ActiveWindow.ScrollRow = 1267
ActiveWindow.ScrollRow = 985
ActiveWindow.ScrollRow = 697
ActiveWindow.ScrollRow = 394
ActiveWindow.ScrollRow = 109
ActiveWindow.ScrollRow = 1
Range("I3").Select
With Range("I3")
.NumberFormat = "General"
.FormulaR1C1 = "=RC[-1]-RC[-4]"
.AutoFill Destination:=Range("I3:I4000"), Type:=xlFillDefault
End With
Range("I3:I4000").Select
End Sub


Any help on this would be very much appreciated

Regards
Donal
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

Forum statistics

Threads
1,224,574
Messages
6,179,633
Members
452,933
Latest member
patv

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top