View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Simon Lloyd[_850_] Simon Lloyd[_850_] is offline
external usenet poster
 
Posts: 1
Default Help with a Type Error


you could try pasting this in to a standard module, you would need a
button on your toolbar to run the macro or a keyboard shortcut, you can
enter your range in the first input box and then your formula or
anything you want in the cells in the second.

Have fun!

Regards,
Simon

Sub cpystuff()
Dim rng As Range
Dim mycell
Dim t
t = InputBox("Enter your range in this format A1:A20", "Range entry",
"You must not use the inverted commas before and after the range")
s = InputBox("enter your formula here!")
Set rng = Range(t)
With Sheets(ActiveSheet.Name)
For Each mycell In rng
mycell.Value = s
Next mycell
End With
End Sub


--
Simon Lloyd
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.excelforum.com/member.php...fo&userid=6708
View this thread: http://www.excelforum.com/showthread...hreadid=569240