Computing desk | ||
---|---|---|
< June 3 | << May | June | Jul >> | June 5 > |
Welcome to the Wikipedia Computing Reference Desk Archives |
---|
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
A | B | C | |
---|---|---|---|
1 | 30 | apples | oranges |
2 | 30 | bananas | apples |
3 | 40 | peaches | lemons |
4 | 50 | apples | grapefruits |
5 | 60 | mangos | pears |
6 | 70 | plums | apples |
7 | 70 | apricots | apples |
I'm looking for a way to count the unique values in column A corresponding to a given value in either column B or column C, using formulas. In the above example, if the value in question is apples (bolded for clarity), the result should be 3, because wherever apples occurs in either column B or column C, it corresponds to three unique column A values, namely "30", "50" and "70" (but not "40" or "60"). Could you help? --Theurgist (talk) 16:33, 4 June 2014 (UTC)
SELECT UNIQUE MY_TABLE.A FROM MY_TABLE INTO TEMP_TABLE WHERE MY_TABLE.B = "apples" OR MY_TABLE.C = "apples";
SELECT COUNT(*) FROM TEMP_TABLE;
DROP TABLE TEMP_TABLE;
=IF(OR(B1="apples",C1="apples"),A1,"")
; in E1 =COUNTIF($D$1:$D$7,D1)
; in F1 =IF(D1="",0,1/E1)
; copy all these formulas down, and then the sum of the values in column F is the number you want. In reality you would presumably have more than 7 rows, so extend the range of the formulas accordingly. Also you would probably want to put "apples" in a special cell and refer to that in the formula rather than the literal value. This is probably a little more long-winded than it needs to be and could be compressed, but it does the job. AndrewWTaylor (talk) 21:51, 4 June 2014 (UTC)As you probably already know, my boss got permission from the company's management to give me a new PC for use for working from home, pre-installed with Windows 8, and I installed Fedora 20 on a second hard disk. The Windows 8 installation is an OEM one, and my boss was worried that adding a second hard drive would break the licence, because it would think it was no longer the same computer. Nothing of the sort happened, and both Windows and Linux work fine. But what will break the licence? Would upgrading its graphics adapter card do such a thing? And if it would, would it start working again if I reverted the change? JIP | Talk 16:39, 4 June 2014 (UTC)
Why is it that my Win8 PC will not connect to my wifi, when I change the wifi password on the phone I use - I have an android phone with tethering enabled. I had an older password, which I changed on the phone, but now my PC will not connect to it. My android tablet will, however, connect. The problem seems to be with the changed password, as my android tablet asks me for a new password, whereas the PC will not. KägeTorä - (影虎) (Chin Wag) 16:58, 4 June 2014 (UTC)
Bitter pit
I have carried out a major revision to this topic. The edited version is OK but when I press the read button there is a problem with some of the references. There is a rectangle around some of them and I can't remove them as they are not on the edit page. Tibby 261--- — Preceding unsigned comment added by Tibby261 (talk • contribs) 23:24, 4 June 2014 (UTC)
== Control of Bitter Pit ==
" (without the quotes).<ref>
" and followed by by "</ref>
" - something like "...known as "Stippen".<ref>Jaeger, G (1869)...</ref>
".((Reflist))
" at the end of the article, preferably preceded by "== References ==
" to give the section a header. Wikipedia will automatically number the references, insert superscripts, and replace "((Reflist))
" with all of the numbered references.