Skip i'r prif gynnwys

Sut i gyfrif gwerthoedd unigryw yn seiliedig ar golofn arall yn Excel?

cyfrif doc unigryw yn ôl meini prawf 1

Efallai y bydd yn gyffredin inni gyfrif gwerthoedd unigryw mewn un golofn yn unig, ond, yn yr erthygl hon, byddaf yn siarad am sut i gyfrif gwerthoedd unigryw yn seiliedig ar golofn arall. Er enghraifft, mae gen i'r data dwy golofn ganlynol, nawr, mae angen i mi gyfrif yr enwau unigryw yng ngholofn B yn seiliedig ar gynnwys colofn A i gael y canlyniad canlynol:

Cyfrif gwerthoedd unigryw yn seiliedig ar golofn arall gyda fformiwla arae


swigen dde glas saeth Cyfrif gwerthoedd unigryw yn seiliedig ar golofn arall gyda fformiwla arae

I ddatrys y broblem hon, gall y fformiwla ganlynol eich helpu chi, gwnewch fel a ganlyn:

1. Rhowch y fformiwla hon: =SUMPRODUCT((($A$2:$A$18=D2))/COUNTIFS($A$2:$A$18,$A$2:$A$18&"",$B$2:$B$18,$B$2:$B$18&"")) mewn cell wag lle rydych chi am roi'r canlyniad, E2, er enghraifft. Ac yna pwyswch Ctrl + Shift + Enter allweddi gyda'i gilydd i gael y canlyniad cywir, gweler y screenshot:

cyfrif doc unigryw yn ôl meini prawf 2

Nodyn: Yn y fformiwla uchod: A2: A18 yw'r data colofn rydych chi'n cyfrif y gwerthoedd unigryw yn seiliedig arno, B2: B18 yw'r golofn rydych chi am gyfrif y gwerthoedd unigryw, D2 yn cynnwys y meini prawf rydych chi'n eu cyfrif yn unigryw yn seiliedig ar.

2. Yna llusgwch y handlen llenwi i lawr i gael gwerthoedd unigryw'r meini prawf cyfatebol. Gweler y screenshot:

cyfrif doc unigryw yn ôl meini prawf 3


Erthyglau cysylltiedig:

Sut i gyfrif nifer y gwerthoedd unigryw mewn ystod yn Excel?

Sut i gyfrif gwerthoedd unigryw mewn colofn wedi'i hidlo yn Excel?

Sut i gyfrif yr un gwerthoedd neu werthoedd dyblyg unwaith yn unig mewn colofn?

Offer Cynhyrchiant Swyddfa Gorau

🤖 Kutools AI Aide: Chwyldro dadansoddi data yn seiliedig ar: Cyflawniad Deallus   |  Cynhyrchu Cod  |  Creu Fformiwlâu Personol  |  Dadansoddi Data a Chynhyrchu Siartiau  |  Invoke Swyddogaethau Kutools...
Nodweddion Poblogaidd: Darganfod, Amlygu neu Adnabod Dyblygiadau   |  Dileu Rhesi Gwag   |  Cyfuno Colofnau neu Gelloedd heb Colli Data   |   Rownd heb Fformiwla ...
Super-edrych: VLookup Meini Prawf Lluosog    VLookup Gwerth Lluosog  |   VLookup Ar Draws Taflenni Lluosog   |   Edrych Niwlog ....
Rhestr gwympo Uwch: Creu Rhestr Gollwng yn Gyflym   |  Rhestr Gollwng Dibynnol   |  Rhestr Gollwng Aml-ddewis ....
Rheolwr Colofn: Ychwanegu Nifer Penodol o Golofnau  |  Symud Colofnau  |  Toglo Statws Gwelededd Colofnau Cudd  |  Cymharwch Ystodau a Cholofnau ...
Nodweddion dan Sylw: Ffocws ar y Grid   |  Golwg Dylunio   |   Bar Fformiwla Mawr    Rheolwr Llyfr Gwaith a Thaflen   |  Llyfrgell Adnoddau (Testun Auto)   |  Dewiswr Dyddiad   |  Cyfuno Taflenni Gwaith   |  Amgryptio/Dadgryptio Celloedd    Anfon E-byst trwy Restr   |  Hidlo Super   |   Hidlo Arbennig (hidlo mewn print trwm/italig/strikethrough...) ...
15 Set Offer Gorau12 Testun offer (Ychwanegu Testun, Dileu Cymeriadau,...)   |   50 + Siart Mathau (Siart Gantt,...)   |   40+ Ymarferol Fformiwlâu (Cyfrifwch oedran yn seiliedig ar ben-blwydd,...)   |   19 mewnosod offer (Mewnosod Cod QR, Mewnosod Llun o'r Llwybr,...)   |   12 Trosi offer (Rhifau i Eiriau, Trosi arian cyfred,...)   |   7 Uno a Hollti offer (Rhesi Cyfuno Uwch, Celloedd Hollt,...)   |   ... a mwy

Supercharge Eich Sgiliau Excel gyda Kutools ar gyfer Excel, a Phrofiad Effeithlonrwydd Fel Erioed Erioed. Kutools ar gyfer Excel Yn Cynnig Dros 300 o Nodweddion Uwch i Hybu Cynhyrchiant ac Arbed Amser.  Cliciwch Yma i Gael Y Nodwedd Sydd Ei Angen Y Mwyaf...

Disgrifiad


Mae Office Tab yn dod â rhyngwyneb Tabbed i Office, ac yn Gwneud Eich Gwaith yn Haws o lawer

  • Galluogi golygu a darllen tabbed yn Word, Excel, PowerPoint, Cyhoeddwr, Mynediad, Visio a Phrosiect.
  • Agor a chreu dogfennau lluosog mewn tabiau newydd o'r un ffenestr, yn hytrach nag mewn ffenestri newydd.
  • Yn cynyddu eich cynhyrchiant 50%, ac yn lleihau cannoedd o gliciau llygoden i chi bob dydd!
Comments (20)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hi, thanks for this formula, I'm having an issue implementing it across two Worksheets. In my example, your columns A and B are on one sheet, and D and E are on another, which collects similar data from other year-based Sheets. If I put the formula on the sheet where D (Area) and E are, in E it just returns a zero =SUMPRODUCT(((MHST2324[@Team]=[@Area]))/COUNTIFS(MHST2324[@Team],MHST2324[@Team]&"",MHST2324[@School],MHST2324[@School]&"")). However if I put the formula on the Sheet where A (Team) and B (School) are, it works =SUMPRODUCT((([@Team]=Schools[Area]))/COUNTIFS([@Team],[@Team]&"",[@School],[@School]&"")), any ideas as to why?
This comment was minimized by the moderator on the site
Hey, thanks for this formula, I'm having a problem where
This comment was minimized by the moderator on the site
Классная формула, но как сделать чтобы в столбец A и B можно было постоянно добавлять и не менять формулу ? закрепить не диапазон а столбцы
This comment was minimized by the moderator on the site
Hello, DM,
In fact, you can enlarg the cell references as you need. For example:
=SUMPRODUCT((($A$2:$A$10000=D2))/COUNTIFS($A$2:$A$10000,$A$2:$A$10000&"",$B$2:$B$10000,$B$2:$B$10000&""))
Please remeber to press Ctrl + Shift + Enter keys together.
Please have a try, hope it can help you!
This comment was minimized by the moderator on the site
Is there a way to do this but not count a blank cell as a value?
This comment was minimized by the moderator on the site
Hello, MB
To count the unqiue values with criteria and skip the blank cell, you should apply the below array formula:
=SUM(--(FREQUENCY(IF($B$2:$B$15<>"",IF($A$2:$A$15=D2,MATCH($B$2:$B$15,$B$2:$B$15,0))),ROW($B$2:$B$15)-ROW(B2)+1)>0))


After pasting the fromula, please press Ctrl + Shift + Enter keys together.

https://www.extendoffice.com/images/stories/comments/comment-skyyang/doc-count-unique-criteria.png

Please try, hope it can help you!
This comment was minimized by the moderator on the site
Thank you very much for this but how does it work with a large data set. I realised it returns #N/A when the data is beyond row 78
This comment was minimized by the moderator on the site
I would need to do something similar but with dates: on a sheet in which the dates are indicated in the first column, many repeated, I would like to know how many different dates there are that meet a certain condition that appears in another column. I am applying that formula but it gives me an error. Could you help me? Thanks.
This comment was minimized by the moderator on the site
Does anyone know what the ampersand-quotes (" &"" ") in the Criteria 1 and 2 portion of the COUNTIFS formula is doing? This formula worked for me I was just hoping to understand it better.
This comment was minimized by the moderator on the site
Worked like a charm. Very much greatful to you.
This comment was minimized by the moderator on the site
OMG.... I have been searching for over a week for a formula that came close to helping me do a distinct count of one column based on another column.... YOURS FINALLY HELPED ;0) I am so happy!!!!!! Now I just need this formula that you posted to do the same thing but based on 2 column instead of one. I am going to try on my own but do you think you can help?
This comment was minimized by the moderator on the site
Hello, EB, To count the unique values based on two columns, please apply the below formula, after entering the formula, please press Ctrl + Shift + Enter keys together to get the correct result.=SUM(IFERROR(($A$2:$A$15=E2)*($B$2:$B$15=F2)/COUNTIFS($C$2:$C$15,$C$2:$C$15,$A$2:$A$15,E2,$B$2:$B$15,F2),0))
Please try, hope it can help you!
This comment was minimized by the moderator on the site
WOAH, you're a savior, thank you for sharing
This comment was minimized by the moderator on the site
Nevermind it did
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations