N= activesheet.name

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

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
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,224,825
Messages
6,181,190
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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