Gary''s Student,
Thank you for your reply. Even though it is not what I had intended in
mind as the destination range needed to be dynamic, but you've given me
ideas for the next steps.
Regards,
Agustus
Gary''s Student wrote:
> Just avoid Copy/Paste:
>
> Sub augi()
> Range("Z100").Formula = Range("C10").Formula
> End Sub
>
> will take the formula in C10 and "copy" it to Z100. No cell references will
> change.
> --
> Gary's Student
> gsnu200701
>
>
> "Agustus" wrote:
>
> > Sorry, typo..
> >
> > I modified this macro from earlier post fom Tom Ogilvy, but it is Not
> > doing
> > exactly what it should be. I like to copy the formula in a selected
> > cell(s) and paste them in another cell without changing the cell
> > reference. Can someone help, please?
> >
> >
> > > Hi,
> > >
> > > I modified this macro from earlier post fom Tom Ogilvy, but it is doing
> > > exactly what it should be. I like to copy the formula in a selected
> > > cell(s) and paste them in another cell without changing the cell
> > > reference. Can someone help, please?
> > >
> > > Thank you in advance.
> > >
> > > Agustus
> > >
> > > Sub CopyFormulas1()
> > > Dim rng1 As Range, rng2 As Range, i As Long
> > > On Error Resume Next
> > > Set rng1 = Selection.CurrentRegion
> > > ' original post had this: Set rng1 = Application.InputBox("Select cells
> > > to copy using mouse", Type:=8)
> > > On Error GoTo 0
> > > If rng1 Is Nothing Then
> > > MsgBox "You selected nothing"
> > > Exit Sub
> > > End If
> > >
> > > On Error Resume Next
> > > Set rng2 = Application.InputBox("Select top cell to paste using mouse",
> > > _
> > > Type:=8)
> > > On Error GoTo 0
> > > If rng2 Is Nothing Then
> > > MsgBox "You selected nothing"
> > > Exit Sub
> > > End If
> > >
> > > i = 1
> > > For Each cell In rng1
> > > rng2(i).Formula = cell.Formula
> > > i = i + 1
> > > Next
> > >
> > > End Sub
> >
> >
|