Shaxda tusmada
Tababarku wuxuu muujinayaa sida loo isticmaalo qaacidada Excel IF si loo eego haddii lambar ama taarikhdu ay u dhexeyso laba qiime. >
>Si loo hubiyo in qiimaha la bixiyay uu u dhaxeeyo laba qiime oo tiro ah, waxaad isticmaali kartaa shaqada AND laba imtixaan oo macquul ah. Si aad u soo celiso qiyamkaaga marka labada tibaaxoodba ay ku qiimeeyaan RUN, buul IYO gudaha shaqada HADDII. Tusaalooyinka faahfaahsan ayaa raacaya hoos.Excel formula: haddii u dhexeeya laba lambar
Si aad u tijaabiso haddii nambarka la siiyay uu u dhexeeyo laba lambar oo aad sheegtay, isticmaal AND function labo Tijaabooyin macquul ah:
- >
- Isticmaal ka weyn ka dib (>) hawlwadeenka si aad u hubiso in qiimihiisu ka sarreeyo tiro yar.
- Isticmaal kan ka yar (<) si aad u hubiso haddii qiimuhu ka hooseeyo tiro ka weyn.
Guud Hadday u dhexayso qaacidada waa:
IYO ( qiimaha> lambarka_yar, qiimaha< lambarka ka weyn)Si loogu daro qiyamka xuduudka, isticmaal ka ka weyn ama la mid ah (>=) iyo in ka yar ama la mid ah (<) ;=) hawlwadeenada:
IYO ( qiimaha>= lambarka_kayar, qiimaha<= lambarka_ka wayn)Waayo, tusaale ahaan, si loo eego haddii tirada A2 ay u dhexayso 10 iyo 20, oo aan lagu darin qiyamka xuduudka, qaacidada B2, oo hoos la koobiyay, waa:
> =AND(A2>10, A2<20)
>Si loo hubiyo in A2 u dhexeeyo. 10 iyo 20, oo ay ku jiraan qiyamka bilowga, qaacidada ku jirta C2 waxay qaadataa foomkan:> =AND(A2>=10, A2<=20)
>In Labada xaaladoodba, natiijadu waa qiimaha Boolean TRUE haddii la tijaabiyeynambarku wuxuu u dhexeeyaa 10 iyo 20, BEEN AH haddii aysan ahayn:> 11> Haddii u dhexeeya laba lambarHaddii aad rabto inaad soo celiso qiimaha gaarka ah haddii lambarku u dhaxeeyo laba qiyam, ka dib dhig IYO qaacidada imtixaanka macquulka ah ee shaqada IF
Tusaale ahaan, si aad u soo celiso "Haa" haddii lambarka A2 uu u dhexeeyo 10 iyo 20, "Maya" haddii kale, isticmaal mid ka mid ah kuwan HADDII Odhaahyada: <3Haddii inta u dhaxaysa 10 iyo 20:
> =IF(AND(A2>10, A2<20), "Yes", "No")
Haddii u dhexeeya 10 iyo 20, oo ay ku jiraan xuduudaha:
> =IF(AND(A2>=10, A2<=20), "Yes", "No")
> Talo. Halkii aad ku adkeyn lahayd qiyamka marinka qaacidada, waxaad geli kartaa unugyo gaar ah, waxaadna tixraaci kartaa unugyadaas sida ku cad tusaalaha hoose.Ka soo qaad in aad leedahay tiro qiyam ah oo ku jirta tiirka A oo aad rabto in aad ogaato qiimayaasha u dhexeeya tirooyinka tiirarka B iyo C ee isku saf ah. Iyadoo loo malaynayo in tiro yar ay had iyo jeer ku jirto tiirka B, tiro ka weynna ay ku jirto tiirka C, hawsha waxaa lagu dhamayn karaa qaacidadan:
=IF(AND(A2>B2, A2
=IF(AND(A2>=B2, A2<=C2), "Yes", "No")
Oo halkan waa kala duwanaanshiyaha Haddii udhaxeeyo odhaah soo celisa qiima lafteeda hadday RUN tahay, qoraal ama xadhig madhan haddi BEEN:
=IF(AND(A2>10, A2<20), A2, "Invalid")
Oo ay ku jiraan xuduudaha:
=IF(AND(A2>=10, A2<=20), A2, "Invalid")
Haddii qiyamka soohdintu ay ku jiraan tiirar kala duwan
>Marka tirada yar iyo tan ka weyn ee aad barbar dhigayso waxay ku soo bixi karaan tiirar kala duwan (tusaale lambar 1 had iyo jeer kama yara yara tirada 2), isticmaal nooc ka sii adag oo ka mid ahformula. IYO ( qiimaha > MIN( num1 , num2 ), qiimaha < MAX( num1). , num2 ))Halkan, waxaan marka hore ku tijaabinaynaa haddii qiimaha bartilmaameedku ka sarreeyo mid ka yar labada lambar ee ay soo celisay shaqada MIN, ka dibna hubi inay ka hooseyso mid ka weyn. labada nambar ee uu soo celiyay shaqada MAX.
Si aad ugu darto tirooyinka bilowga, u hagaaji caqliga sida soo socota:
AND( qiimaha >= MIN( num1<) 2>, num2 ), qiimaha <= MAX( num1 , num2 ))Tusaale ahaan, si aad u ogaato Haddii lambarka A2 uu u dhexeeyo laba lambar oo B2 iyo C2 ah, isticmaal mid ka mid ah hababkan:
Marka laga reebo xuduudaha:
=AND(A2>MIN(B2, C2), A2
> Oo ay ku jiraan xuduudaha: > =AND(A2>=MIN(B2, C2), A2<=MAX(B2, C2))
Si aad u soo celiso qiyamkaaga halkii aad ka ahaan lahayd RUN iyo BEEN, adeegso Excel soo socda HADDII bayaanka u dhexeeya laba lambar:
=IF(AND(A2>MIN(B2, C2), A2
=IF(AND(A2>=MIN(B2, C2), A2<=MAX(B2, C2)), "Yes", "No")
>
Qaabka Excel: haddii u dhexeeya laba taariikhood
> Haddii u dhexeeya taariikhaha qaacidada Excel asal ahaan waxay la mid tahay Haddii ay u dhexeeyaan tirooyinka .Si loo hubiyo in taariikhda la siiyay ay tahay wi dhuuban qayb gaar ah, qaacidada guud waa:
HADDII (IYO( taariikhda>= taariikhda_bilawga, taariikhda<= dhamaadka_taariikhda2>), value_if_true, value_if_false)Aan lagu darin taariikhaha xadka:
HADDII (IYO ( taariikhda> taariikhda_bilawga, taariikhda< dhamaadka_taariikhda), value_if_true, value_if_false)Si kastaba ha ahaatee, waxaa jira digniin: HADDII uu aqoonsado taariikhaha si toos ah loogu soo gudbiyay doodiisa iyo tixgelintiisaiyaga sida xargaha qoraalka. HADDII si loo aqoonsado taariikhda, waa in lagu duuduubaa shaqada DATEVALUE.
Tusaale ahaan, si aad u tijaabiso haddii taariikhda A2 ku dhacayso inta u dhaxaysa 1-Jan-2022 iyo 31-Dec-2022 lagu daro, waxaad isticmaali kartaa formula this:
=IF(AND(A2>=DATEVALUE("1/1/2022"), A2<=DATEVALUE("12/31/2022")), "Yes", "No")
>Hadii, taariikhda bilawga iyo dhamaadka ay ku jiraan unugyo hore loo sii qeexay, qaacidada ayaa noqonaysa mid aad u fudud:
=IF(AND(A2>=$E$2, A2<=$E$3), "Yes", "No")
Halka $ E$2 waa taariikhda bilawga ah iyo $E$3 waa taariikhda dhamaadka Fadlan u fiirso isticmaalka tixraacyo dhammaystiran si aad u qufuliso ciwaanada unugga, si qaacidadu aanay u jabin marka lagu koobiyo unugyada hoose.
Talo. Haddii taariikh kasta oo la tijaabiyay ay ku dhacdo kala duwanaanteeda, taariikhaha soohdintana waa la is beddeli karaa, ka dib isticmaal hawlaha MIN iyo MAX si aad u go'aamiso taariikh yar iyo mid weyn sida lagu sharraxay Haddii qiyamka xuduuddu ay ku jiraan tiirar kala duwan.
Haddii tariikhdu ay ku jirto maalmaha N soo socda
>Si aad u tijaabiso inay tariikhdu ku jirto gudaha n maalmood ee soo socda ee taariikhda maanta, isticmaal shaqada MAANTA si aad u go'aamiso taariikhda bilawga iyo dhamaadka. Gudaha qoraalka AND, imtixaanka ugu horreeya ee macquulka ah wuxuu hubinayaa haddii taariikhda la beegsanayo ay ka weyn tahay taariikhda maanta, halka imtixaanka labaadna uu hubinayo haddii ay ka yar tahay ama la mid tahay taariikhda hadda lagu daray n maalmood: IF si loo tijaabiyo haddii taariikhda A2 ay dhacdo 7da maalmood ee soo socda, qaacidadu waa: =IF(AND(A2>TODAY(), A2<=TODAY()+7), "Yes", "No")
>Haddii tariikhdu ay ku jirto maalmaha N ugu dambeeya >Si loo tijaabiyo haddii ataariikhda la siiyay waa gudaha n maalmood ee ugu dambeeya taariikhda maanta, waxaad mar kale isticmaashaa HADDII oo ay la socdaan hawlaha IYO MAANTA. Imtixaanka macquulka ah ee ugu horreeya ee AND wuxuu hubinayaa haddii taariikhda la tijaabiyey ay ka weyn tahay ama la mid tahay taariikhda maanta laga jaray n maalmood, imtixaanka labaadna wuxuu hubiyaa haddii taarikhdu ay ka yar tahay maanta:
Tusaale ahaan, si loo go'aamiyo haddii taariikhda A2 waxay dhacday 7dii maalmood ee la soo dhaafay, qaacidadu waa:
=IF(AND(A2>=TODAY()-7, A2
Hopefully, our examples have helped you understand how to use the If between formula in Excel efficiently. I thank you for reading and hope to see you on our blog next week!
Practice workbook
Excel If between - formula examples (.xlsx file)