recording macro isnt inserting formulas correctly

jordanburch

Active Member
Joined
Jun 10, 2016
Messages
291
Office Version
  1. 2016
Hi all


I am recording a macro and having some trouble. It seems to work perfectly on one sheet but not on another
this selects the FY20 sheet and then does some filtering of certain columns hence why is starts on 713. I actually need this to insert on visible cells after the filters have been applied if you can help with that as well.
Code:
Range("AS713").Select
    ActiveCell.FormulaR1C1 = "=+CONCATENATE(RC[-40],RC[-39])"
    Range("AS713").Select
    Selection.FillDown
    Range("AT713").Select
    ActiveWindow.ScrollColumn = 34
    ActiveWindow.ScrollColumn = 35
    ActiveWindow.ScrollColumn = 36
    ActiveCell.FormulaR1C1 = "=+SUMIF(C[-1],RC[-1],C[-9])"
    Range("AT713").Select
    Selection.FillDown
    Range("AW713").Select
    ActiveCell.FormulaR1C1 = "=+CONCATENATE(RC[-4],RC[-3])"
    Range("AW713").Select
    Selection.FillDown
    Sheets("CRIS").Select
    Range("Z1").Select
    ActiveCell.FormulaR1C1 = "sub key"
    Range("AA1").Select
    ActiveCell.FormulaR1C1 = "sub key"
    Range("AB1").Select
    ActiveCell.FormulaR1C1 = "sub key"
    Range("AC1").Select
    ActiveCell.FormulaR1C1 = "su key"
    Range("AD1").Select
    ActiveCell.FormulaR1C1 = "master key"
    Range("AE1").Select
    ActiveCell.FormulaR1C1 = "match"
    Range("Z2").Select
    ActiveCell.FormulaR1C1 = "=+IF(RC[-20]="""","""","""")"
    Range("Z2").Select
    Selection.AutoFill Destination:=Range("Z2:Z1311")
    Range("Z2:Z1311").Select
    Range("Z2").Select
    ActiveCell.FormulaR1C1 = "=+IF(RC[-20]="""",""0000"","""")"
    Range("Z2").Select
ActiveCell.FormulaR1C1 = "=+IF(RC[-20]="""",""0000"","""")"
    Range("Z2").Select
    Selection.AutoFill Destination:=Range("Z2:Z1311")
    Range("Z2:Z1311").Select
    Range("AA2").Select
    ActiveCell.FormulaR1C1 = ""
    Range("AA2").Select
    ActiveCell.FormulaR1C1 = "=+SUMIF(C[-1],,C[-8])"
    Range("AB2").Select
    ActiveCell.FormulaR1C1 = "=+SUMIF(C[-1],RC[-1],C[-8])"
    Range("AB2").Select
    Selection.AutoFill Destination:=Range("AB2:AB1311")
    Range("AB2:AB1311").Select
    Range("AD2").Select
    ActiveCell.FormulaR1C1 = "=+CONCATENATE(RC[-3],)"
    Range("AD2").Select
    Selection.AutoFill Destination:=Range("AD2:AD1311")
    Range("AD2:AD1311").Select
    Range("AE2").Select
    ActiveCell.FormulaR1C1 = "=+MATCH(RC[-1],'MAY FY20 IDARRS'!C[18],0)"
    Range("AE2").Select
anyone know why this isnt inserting the formulas correctly? nothing else happens after i insert these formulas to that sheet fyi.

Jordan
 
Last edited by a moderator:

Some videos you may like

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
36,544
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
What should the formulas be?
 

jordanburch

Active Member
Joined
Jun 10, 2016
Messages
291
Office Version
  1. 2016
What should the formulas be?
where it says formula r1c1 thats what it should be its just not putting them there.

as713
=+CONCATENATE(E713,F713)
at713
=+SUMIF(AS:AS,AS713,AK:AK)
ak713
=+CONCATENATE(AS713,AT713)


thats what i want it to be but for whatever reason recording it isnt working properly.
 

Watch MrExcel Video

Forum statistics

Threads
1,128,141
Messages
5,628,947
Members
416,354
Latest member
JojoMaque

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
Top