Copy formula depending on a different column

The_Rock

Board Regular
Joined
Jul 2, 2007
Messages
174
Hi
Hoping you guys can help with the below.

So what the code is doing is it is searching for 'Global Name' in Col M and then moves down a row to where the formula's are stored.
I then want to copy the formula's down for the number of rows in Col L.
I can't find the right code to do as it is mixing relative references with fixed??

Note: Global Name can appear in any cell in Column M which is why I am using search and offset.

Code:
  ''Find first line of formula and copy down
    Columns("M:M").EntireColumn.Select
    Selection.Find(What:="Global Name", After:=ActiveCell, LookIn:=xlFormulas _
        , LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
        MatchCase:=False, SearchFormat:=False).Activate
    
    ActiveCell.Offset(1, 0).Range("A1:C1").Select
    Range(Selection, Selection.End(xlDown)).Select
    Selection.FillDown

Appreciate your help.
Thanks
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying

Forum statistics

Threads
1,215,014
Messages
6,122,697
Members
449,092
Latest member
snoom82

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