Reference Sheetname

sapads01

New Member
Joined
Feb 12, 2015
Messages
22
I need to pickup the sheetname for the formula below in cell A1 of a sheet called LookUps.

HTML:
Range("J2").Select
    ActiveCell.FormulaR1C1 = _
        "=SUMIFS(Plan!C[-5],Plan!C[-9],RC[-2],Plan!C[-8],RC[-1])"

Can anyone help? I've tried using indirect but cannot get it to work.
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
I think we need more explanation/detail.
Where is the sheetname value coming from?

By the way, you can condense what you have above to this (no need for unnecessary SELECT statements that just slow down the code):
Code:
Range("J2").FormulaR1C1 = "=SUMIFS(Plan!C[-5],Plan!C[-9],RC[-2],Plan!C[-8],RC[-1])"
 
Upvote 0

Forum statistics

Threads
1,215,054
Messages
6,122,895
Members
449,097
Latest member
dbomb1414

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