AndyDevine1

Board Regular
Joined
Jun 1, 2006
Messages
172
Hi

What is the code change to change 'DataSheet1' to N

where n = activesheet.name


Original code:
Range(Cells(10, 1), Cells(j, 1)).Value = "=IFERROR(INDEX(List!C[1],MATCH('DataSheet1'!RC[4],List!C[1],0),1),0)"

This doesnt work:
Range(Cells(10, 1), Cells(j, 1)).Value = "=IFERROR(INDEX(List!C[1],MATCH('n'!RC[4],List!C[1],0),1),0)"


Many thanks

Andy
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Hi, if N is the active sheets name and the formula is going in the active sheet then it seems to me that you don't need to include it.

Code:
Range(Cells(10, 1), Cells(j, 1)).FormulaR1C1 = "=IFERROR(INDEX(List!C[1],MATCH(RC[4],List!C[1],0),1),0)"
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,155
Messages
6,123,332
Members
449,098
Latest member
thnirmitha

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