Quantcast
Channel: Apache OpenOffice Community Forum
Viewing all articles
Browse latest Browse all 1291

Calc • Referencing multiple sheets in a formula when trying to validate and count a text value

$
0
0
Hello All,

Thanks in advance for any help that y'all can give me.

I am trying to plan a workbook that will have multiple sheets with the same column and row headers but the column-to-row values will change depending on the sheet. For example, Column B1 would be “Widgets” and Row A2 would be “Japan”. On sheet 1, the value at B2 might be “Y” but on the next sheet the cell would have a value of “N”.

So far I have been able to piece together the following formula:

=SUM(IF(AND(AND('sheet 1'.B2="Y”);AND('Sheet 2'.B2="N"));1;0))

I get the desired result however this formula is going to get very long as more sheets are added. Is there a way to specify a range of sheets and have Calc evaluate each specified cell and only return the desired value?

The idea is to have two formulas for two different cells, one for the “Y” count # and one for the “N” count.

Also, even though I am looking to match certain values, that function only appears to work for the position of the value not the number of occurrences matched in a range.

I did try the following option as well but had no luck getting it to work. Mostly either err:502 or #Value error even though the formula will work if only 1 sheet is used (without the 'Sheet' variables):

=SUM((COUNTIF('Sheet 1'.B2;"Y);(COUNTIF('Sheet 2';B2;"N"))))

As well as:

=COUNT(IF(AND(AND('Sheet 1'.B2="Y");AND('Week 2'.B2="Y"));1;0))

For some reason though, that formula only returns a 1 no matter what value is in the referenced cells. I've tried setting default formatting, retyping in a new cell, etc. Not sure if its a bug or just a bad formula on my part at this stage.


The solution to this is probably staring me in the face and I am over-engineering a simple task but hopefully some more eyes will tell me where I'm going wrong.

Thanks again for taking a look.

P.S. Also:
Windows 10
Open Office 4.1.13

Statistics: Posted by Johnhk631 — Wed Sep 11, 2024 1:44 am



Viewing all articles
Browse latest Browse all 1291

Trending Articles