Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Macro 1

Status
Not open for further replies.

drmichaelw

IS-IT--Management
Oct 5, 2002
66
US
I am copying a column of values and formulas. I want to write a macro that pastes formulas only.

The challenge I am having is that I need to run this macro on different cells each time I run the macro. How can I code the macro to work on only the cells I select.

This is the code I have so far. The problem as you can see
is that the macro will only work in cell F20. I need to be able to choose the cells that the macro will run on.

Thanks for your response

Sub Paste_Formula()
'

'

'
Range("F20").Select
Selection.PasteSpecial Paste:=xlFormulas, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
End Sub
 
Do you need help with selecting the source range or the destination range ?

If you have data on the clipboard and just want to paste it starting at the selected cell, the code you have posted would work if you remove the line [bold]Range("F20").Select[/bold]

A.C

 
I am not sure if this will make sense but I'll give it my best shot.

I have two worksheets. One is called "Estimator" the second is "Brock Email". I need for "Estimator" to automatically populate the information from the certain cells in "Brock Email".

The only way that I know how to do this is to enter "=" on the cell that I need the formula on and hit "enter" on the "Brock Email" worksheet where the information needs to be pulled from.

Is there an easier way to do this?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top