Alexandroid
New Member
- Joined
- Jan 29, 2014
- Messages
- 16
Hey everyone, This one might be hard to explain so please be patient with me.
What I'm trying to do is create a formula that will go into a closed workbook, and calculate the amount of times the letter "P" is in column "N:N" in specific worksheets of that workbook. I have the name of the workbook listed in Cell A4 of the workbook that is Openned (not the one I'm trying to gather the information from) and A8-A20 contains the name of the sheet within the workbook that is closed.
I've tried the following formula:
Formula #1
=SUMPRODUCT(--("'["&TEXT($A$4,"00")&".xls]"&TEXT($A8,"00")&"'!$N:$N"="P"))
The formula without pointing to cells A4 and A8 would look like this:
Formula #2
=SUMPRODUCT(--('N:\folder\anotherfolder\[spreadsheet.xls]Sheet1'!$N$:$N$="P"))
The problem is that if I use formula #1 from above, when I click "Evaluate Formula" it ends up finding all the correct text to complete the path that is needed, but it's putting that string between double quotes ("'N:\folder\anotherfolder\[spreadsheet.xls]Sheet1'!$N$:$N$") and the formula just returns 0 (zero) instead of the proper number of times it found the letter P in the column N. This isn't the first time I'm having trouble with the Quotes when creating a formula this way so if there is a solution to that, that is what I would like.
The reason I'm using the above formula is because the workbooks that this formula goes through are closed and I get the #REF:
=COUNTIF(INDIRECT("'["&TEXT($A$4,"00")&".xls]"&TEXT($A8,"00")&"'!$N:$N"),"P")
I'm sure I'm missing something to paint the picture of what I need so please let me know if you need any clarification!
Thanks
What I'm trying to do is create a formula that will go into a closed workbook, and calculate the amount of times the letter "P" is in column "N:N" in specific worksheets of that workbook. I have the name of the workbook listed in Cell A4 of the workbook that is Openned (not the one I'm trying to gather the information from) and A8-A20 contains the name of the sheet within the workbook that is closed.
I've tried the following formula:
Formula #1
=SUMPRODUCT(--("'["&TEXT($A$4,"00")&".xls]"&TEXT($A8,"00")&"'!$N:$N"="P"))
The formula without pointing to cells A4 and A8 would look like this:
Formula #2
=SUMPRODUCT(--('N:\folder\anotherfolder\[spreadsheet.xls]Sheet1'!$N$:$N$="P"))
The problem is that if I use formula #1 from above, when I click "Evaluate Formula" it ends up finding all the correct text to complete the path that is needed, but it's putting that string between double quotes ("'N:\folder\anotherfolder\[spreadsheet.xls]Sheet1'!$N$:$N$") and the formula just returns 0 (zero) instead of the proper number of times it found the letter P in the column N. This isn't the first time I'm having trouble with the Quotes when creating a formula this way so if there is a solution to that, that is what I would like.
The reason I'm using the above formula is because the workbooks that this formula goes through are closed and I get the #REF:
=COUNTIF(INDIRECT("'["&TEXT($A$4,"00")&".xls]"&TEXT($A8,"00")&"'!$N:$N"),"P")
I'm sure I'm missing something to paint the picture of what I need so please let me know if you need any clarification!
Thanks