Yuav ua li cas Siv Google Sheets COUNTIF muaj nuj nqi

Cov txheej txheem:

Yuav ua li cas Siv Google Sheets COUNTIF muaj nuj nqi
Yuav ua li cas Siv Google Sheets COUNTIF muaj nuj nqi
Anonim

Yuav Paub

  • Enter =COUNTIF(range, criterion), hloov " range" and " criterion " nrog cov ntaub ntawv xav tau.
  • Ib tus neeg sib piv xws li >, <=, lossis siv tau rau hauv kev qhia.

Kab lus no piav qhia yuav ua li cas siv COUNTIF muaj nuj nqi hauv lub vev xaib thiab mobile versions ntawm Google Sheets.

COUNTIF Syntax and Arguments

COUNTIF muaj nuj nqi ua ke nrog IF muaj nuj nqi thiab COUNT muaj nuj nqi hauv Google Sheets. Qhov kev sib xyaw ua ke no suav cov sij hawm tshwj xeeb cov ntaub ntawv pom nyob rau hauv ib qho kev xaiv ntawm cov hlwb uas ua tau raws li ib qho, cov txheej txheem teev tseg. Qhov IF feem ntawm txoj haujlwm txiav txim siab seb cov ntaub ntawv twg ua tau raws li qhov ntsuas. COUNT feem suav nrog cov lej uas ua tau raws li qhov ntsuas.

A muaj nuj nqi syntax yog hais txog lub luag haujlwm layout thiab suav nrog lub npe ua haujlwm, brackets, comma separators, thiab cov lus sib cav. Cov syntax rau COUNTIF muaj nuj nqi yog:

=COUNTIF(range, criterion)

The range yog pab pawg ntawm cov hlwb ua haujlwm yuav tshawb.

Yog hais tias qhov kev sib cav muaj cov lej:

  • Ib tus neeg sib piv xws li > (ntau dua), <=(tsawg dua lossis sib npaug), lossis (tsis sib npaug to) tuaj yeem siv rau hauv kev nthuav qhia. Txhua lub xov tooj ntawm tes hauv qhov ntau yog kuaj xyuas seb nws puas ua tau raws li qhov ntsuas.
  • Rau qhov ntsuas uas tshawb nrhiav qhov sib npaug, kos npe sib npaug(=) tsis tas yuav suav nrog hauv cov lus qhia, thiab tus nqi tsis tas yuav tsum tau muab kaw hauv cov lus hais cov cim. Piv txwv li, 100 tuaj yeem siv rau qhov kev sib cav tsis yog "=100," txawm tias ob qho tib si yuav ua haujlwm.
  • Rau cov lus tsis sib npaug uas tsis suav nrog cov ntaub ntawv xovtooj, muab cov lus qhia hauv ob nqe lus hais (piv txwv li, "<=1000").
  • Rau cov lus hais uas siv cov neeg ua haujlwm sib piv thiab cov ntaub ntawv xovtooj ntawm tes, cov ntaub ntawv xovtooj ntawm tes yuav tsis nyob hauv ob lub ntsiab lus, xws li ""&B12 lossis "<="&C12.
  • Rau cov lus hais uas siv cov neeg ua haujlwm sib piv thiab cov ntaub ntawv xovtooj, tus neeg teb xov tooj sib piv tau koom nrog lub xovtooj siv nrog ampersand (&), uas yog tus cim concatenation hauv Excel thiab Google Sheets, piv txwv li, ""&B12 lossis " <="&C12.

Yog hais tias qhov kev sib cav ntau muaj cov ntaub ntawv:

  • Cov kab ntawv raug kaw hauv ob lub ntsiab lus (piv txwv li, "drapes").
  • Cov kab ntawv tuaj yeem muaj ? thiab cov cim tsiaj qus kom phim ib qho (?) lossis ntau () cov cim sib txuas.
  • Ua kom phim qhov tseeb? los yog, nkag mus rau tilde ua ntej cov cim no, piv txwv li, ~? thiab ~.

Tus criterion txiav txim siab seb lub xov tooj ntawm tes uas tau txheeb xyuas hauv qhov kev sib cav yog suav los yog tsis. Cov txheej txheem tuaj yeem yog:

  • A tus naj npawb.
  • Ib lub xovtooj siv rau qhov chaw ntawm cov ntaub ntawv hauv daim ntawv ua haujlwm, xws li B12.
  • Ib qho kev qhia, xws li 100, "<=1000" lossis ""&B12.
  • Cov ntaub ntawv lossis kab ntawv, "Drapes" yog piv txwv.

COUNTIF Function Piv txwv

Lub COUNTIF muaj nuj nqi qhia hauv kab lus no pom cov xov tooj ntawm cov ntaub ntawv hauv kab A uas phim ntau yam qauv. COUNTIF cov ntsiab lus tau tshwm sim hauv kab B thiab cov qauv qhia hauv kab C.

  • thawj tsib kab ntawm qhov piv txwv muaj cov ntaub ntawv rau kev ua haujlwm qhov kev sib cav thiab siv cov hlwb A2 rau A6 rau qhov sib cav ntau.
  • tsib kab kawg muaj cov ntaub ntawv tus lej rau qhov kev sib cav.
Image
Image

Yuav ua li cas nkag rau COUNT muaj nuj nqi

Google Sheets tsis siv lub thawv sib tham los nkag rau cov lus sib cav raws li pom hauv Excel. Hloov chaw, nws muaj lub npov qhia pib uas tshwm sim raws li lub npe ntawm cov haujlwm tau ntaus rau hauv lub xovtooj.

Cov kauj ruam hauv qab no qhia yuav ua li cas nkag mus rau COUNTIF muaj nuj nqi thiab nws cov lus sib cav nyob hauv cell B11. Hauv lub xovtooj no, COUNTIF tshawb nrhiav qhov ntau ntawm A7 txog A11 rau cov lej uas tsawg dua lossis sib npaug rau 100, 000.

Nkag mus rau COUNTIF muaj nuj nqi thiab nws cov lus sib cav raws li qhia hauv cell B11 ntawm daim duab:

  1. Xaiv cell B11 ua kom nws lub cev muaj zog. Qhov no yog qhov uas cov txiaj ntsig ntawm COUNTIF muaj nuj nqi yuav tso tawm.

    Image
    Image
  2. Hloov lub kos npe sib npaug (=) ua raws li lub npe ntawm txoj haujlwm countif.
  3. Raws li koj ntaus ntawv, lub npov qhia pib pib tshwm nrog cov npe thiab cov ntsiab lus ntawm cov haujlwm uas pib nrog tsab ntawv C.
  4. Thaum lub npe COUNTIF tshwm nyob rau hauv lub thawv, nias Enter txhawm rau nkag mus rau lub npe ua haujlwm ua raws li ib puag ncig.

    Image
    Image
  5. Highlight hlwb A7 rau A10 kom suav cov hlwb no ua qhov sib cav ntau.

    Image
    Image
  6. Type a comma los ua tus sib cais ntawm qhov ntau thiab qhov kev sib cav.
  7. Tom qab lub comma, ntaus cov lus "<="&C12 nkag mus rau nws raws li qhov kev sib cav.

  8. Nias Enter kom ua tiav txoj haujlwm.
  9. Cov lus teb 4 tshwm hauv xovtooj B11, vim tag nrho plaub lub hlwb hauv qhov kev sib cav muaj cov lej tsawg dua lossis sib npaug rau 100, 000.

Xaiv xovtooj B11 kom pom cov qauv ua tiav hauv cov qauv qhia saum toj ntawm daim ntawv ua haujlwm:

=countif (A7:A10, "<="&C12

Pom zoo: