Need help with concatenation syntax

Pawtang

New Member
Joined
Jul 25, 2018
Messages
2
I've got this egregious bit of code here. It won't do any good to explain exactly what its trying to do; the main part I am trying to correct the syntax for s in the first "Indirect" function. I am trying to pull references from two cells into the formula, from cell C3 and cell H3. I am getting a #REF ! error

Code:
=COUNTIF(INDIRECT("'"&$C3&"'!C$'"&$H3&"':W$'"&$H3&"'"),"Y")/(COUNTIF(INDIRECT("'"&$C3&"'!C$10:W$10"),"Y")+COUNTIF(INDIRECT("'"&$C3&"'!C$10:W$10"),"N"))

It worked when I just had this:
Code:
=COUNTIF(INDIRECT("'"&$C4&"'!C$10:W$10"),"Y")/(COUNTIF(INDIRECT("'"&$C4&"'!C$10:W$10"),"Y")+COUNTIF(INDIRECT("'"&$C4&"'!C$10:W$10"),"N"))

But i have to add the second reference to index to the correct row on the linked page.
Mainly I don't understand the whole nested quotation marks logic. Can anyone explain whats wrong and how to fix?
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Ok, I've solved my own problem. It was the second appearance of single quotes - ' - that I had used. Took those out and it works just fine.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
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