Formula in VBA not working

taostep1

Board Regular
Joined
May 18, 2016
Messages
65
Hi All,

The following VBA is kicking out a 1004 error and can't seem to understand why this is happening.

Sub test()


Sheets("pivot").Select


Range("F5").Select
ActiveCell.FormulaR1C1 = "=IF(COUNTIF('Confirmed Movement '!$L:$L,RC[-2])>0,""INPUT IS NEEDED"",""NOT ON EDGE ROSTER"")"




End Sub

Any help would be great.
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Please try it.
Range("F5").FormulaR1C1"=IF(COUNTIF('Confirmed Movement '!C12,RC[-2])>0,""INPUT IS NEEDED"",""NOT ON EDGE ROSTER"")"
 
Upvote 0
But I need the entire range of column L for this formula to legit work. Is there another alternative?
 
Upvote 0
C12 is the entire column L, in R1C1 notation.
 
Upvote 0

Forum statistics

Threads
1,214,975
Messages
6,122,538
Members
449,088
Latest member
RandomExceller01

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