ä»æ¥ã¯ãããªãå°ãããšã解決ããŸãã
Excelãšã¯ã»ã«ã§ãããŒã¿ã®éè€ããã§ãã¯ããæ¹æ³ãšãéè€ããããŒã¿ãåé€ããæ¹æ³ãã玹ä»ããŠãããŸããã
- CASE1ïŒããŒã¿ã«éè€ãããããã§ãã¯ããæ¹æ³
- CASE2ïŒéè€ããããŒã¿ãåé€ããæ¹æ³
éè€ãšããã®ã¯ãå®å šäžèŽããããŒã¿ã2ã€ä»¥äžéãªã£ãŠååšããŠããŸã£ãŠããããšããããšã§ãã
ãã®æ¹æ³ã䜿ãã°ãèªåã§æ¢ãæéãçããã®ã§äœæ¥å¹çãäžãããŸãã
CASE1ïŒExcel(ãšã¯ã»ã«)ã§ããŒã¿ã«éè€ãããããã§ãã¯ããæ¹æ³
ããŒã¿ã®éè€ããã§ãã¯ããç°¡åãªæ¹æ³ãšããŠã¯2ã€ãããŸãã
- COUNTIFé¢æ°ã䜿ã£ãæ¹æ³
- VLOOKUPé¢æ°ã䜿ã£ãæ¹æ³
ã§ã¯ãé çªã«æäœæ¹æ³ã解説ããŠãããŸãã
COUNTIFé¢æ°ã䜿ã£ãŠéè€ããã§ãã¯ããæ¹æ³
COUNTIFã§æ€çŽ¢å€ã«äžèŽããããŒã¿åæ°ãã«ãŠã³ãããããšã«ãã£ãŠããŒã¿ãéè€ããŠãããã調ã¹ãæ¹æ³ã§ãã
COUNTIFé¢æ°ã®å ¬åŒ=COUNTIF ( ç¯å², æ€çŽ¢æ¡ä»¶)
ç¯å²ïŒæ€çŽ¢ãããããç¯å²
æ€çŽ¢æ¡ä»¶ïŒæ€çŽ¢ãããæ¡ä»¶
â»æ€çŽ¢æ¡ä»¶ã«ã¯ãæ°å€ã»æååã»ã»ã«çªå·ã»æ°åŒã»æ¯èŒæŒç®åŒã䜿ãã
ã§ã¯ãæäœæ¹æ³ã§ãã
äŸïŒCOUNTIFé¢æ°ã䜿ã£ãŠçªå·Aãšçªå·Bã®ããŒã¿ã«éè€ããããããã§ãã¯ãã
ïŒDåã«ãã§ãã¯å€å®ã衚瀺ãããïŒ
çªå·Bã®ããŒã¿ãããããçªå·Aã®äžã«ããã€ããããèŠãŠãããŸã
ïŒâ»é¢æ°ã¯ã»ã«D3ã«å
¥åãããã®ãã³ããŒããã®ã§ã²ãšã€ã²ãšã€å
¥åããå¿
èŠã¯ãããŸããïŒ
1ãŸãã»ã«D3ã«é¢æ°ãå
¥åããŠãã
=COUNTIF()ã®äžã«ãç¯å²ããæ€çŽ¢æ¡ä»¶ããå
¥ãã
âç¯å²ïŒ$A$3:$A$11
æ€çŽ¢ãããããç¯å²ã¯ãA3:A11ãã ããé¢æ°ããã©ãã°ïŒã³ããŒãããšãã«ç¯å²ãããããããªãã®ã§çµ¶å¯Ÿåç
§ã«ããŠã$A$3:$A$11ããšãã
âæ€çŽ¢æ¡ä»¶ïŒC3
æ€çŽ¢ãããæ¡ä»¶ã¯ã»ã«C3ã®ããŒã¿ãªã®ã§ã»ã«çªå·ã§æå®ããŠãC3ããšãã
ããããå
¬åŒã«ããŠã¯ãããš
=COUNTIF($A$3:$A$11,C3)
2ã»ã«D3ã«éè€ã®æ°ã衚瀺ããã
3ã»ã«D3ã®é¢æ°ãã»ã«D11ãŸã§ãªãŒããã£ã«ã³ããŒïŒâ»ãªãŒããã£ã«ã®ããæ¹ïŒ
4å šéšã®ã»ã«ã«éè€æ°ã衚瀺ããã
ãã®è¡šç€ºãããæ°ã«ãã£ãŠãéè€ããããã©ãããå€å¥ããã°OKã
衚瀺ãããæ°ãã»ã»ã»
- ã0ããªãâãããŒã¿ã«éè€ãªã
- ã1ããªãâãããŒã¿ã«éè€ãã
ïŒ1ã€éè€ãèŠã€ãã£ãïŒ
ããä»®ã«è¿ãå€ã®ããŒã¿åæ°ãã2ãã3ãã»ã»ã»ãšè¡šç€ºãããããéè€ããŒã¿ã2åã3åãããšããããšã«ãªããŸãã
ãã®ããã«COUNTIFé¢æ°ã䜿ãã°ãæ€çŽ¢å€ã«äžèŽããããŒã¿ã®åæ°ãæ°ãããããšã§éè€ããããã©ãããç°¡åã«ãã§ãã¯ãããããšãã§ããŸãã
COUNTIFã¯éè€ãããããªããã¯ãã¡ãããã®ããŒã¿ã«éè€ã ãäœå ãã£ãã®ããéè€ã®æ°ãææ¡ããããšãã§ããã®ã§äžç³äºé³¥ã§ãã
VLOOKUPé¢æ°ã䜿ã£ãŠéè€ããã§ãã¯ããæ¹æ³
VLOOKUPã¯ãæ€çŽ¢å€ã«äžèŽããããŒã¿ïŒãããã¯äžèŽããããŒã¿ãšåè¡ã®ããŒã¿ïŒãåŒã£ã±ã£ãŠããé¢æ°ãªã®ã§ãäžèŽããããŒã¿ãããïŒéè€ãããããšããå€å¥ã®ä»æ¹ã§éè€ãã§ãã¯ãã§ããŸãã
VLOOKUPé¢æ°ã®å ¬åŒ=VLOOKUP( æ€çŽ¢å€, ç¯å² ,åçªå· ,æ€çŽ¢æ¹æ³)
æ€çŽ¢å€ïŒæ€çŽ¢ãããå€
ç¯å²ïŒæ€çŽ¢ãããããç¯å²
åçªå·ïŒæœåºãããåïŒç¯å²äžã®å·Šããæ°ããŠäœçªç®ãïŒ
æ€çŽ¢æ¹æ³ïŒæ€çŽ¢ãã圢åŒïŒâ»ïŒ
â»æ€çŽ¢æ¹æ³ã¯ä»¥äž2ãã¿ãŒã³ããéžæãã
å®å
šäžèŽã§æ€çŽ¢ããããªãïŒã0ããŸãã¯ãFALSEã
è¿äŒŒå€æ€çŽ¢ãããããªãïŒã1ããŸãã¯ãTRUEããšå
¥å
ã§ã¯ãæäœæ¹æ³ã§ãã
äŸïŒVLOOKUPé¢æ°ã䜿ã£ãŠçªå·Aãšçªå·Bã®ããŒã¿ã«éè€ããããããã§ãã¯ããïŒDåã«ãã§ãã¯å€å®ã衚瀺ãããïŒ
çªå·Bã®ããŒã¿ãããããçªå·Aã®äžã«ãããã©ãããè¿ã£ãŠããããŒã¿ã®å
容ã«ãã£ãŠå€å¥ããŠãã
ïŒâ»é¢æ°ã¯ã³ããŒããã®ã§ã²ãšã€ã²ãšã€å
¥åããå¿
èŠã¯ãããŸããïŒ
1ã»ã«D3ã«é¢æ°ãå
¥åããŠãã
=VLOOKUP()ã®äžã«ãæ€çŽ¢å€ããç¯å²ããåçªå·ããæ€çŽ¢æ¹æ³ããå
¥ããŠãã
âæ€çŽ¢å€ïŒC3
æ€çŽ¢ãããæ¡ä»¶ã¯ã»ã«C3ã®ããŒã¿ãªã®ã§ã»ã«çªå·ã§æå®ããŠãC3ããšãã
âç¯å²ïŒ$A$3:$A$11
æ€çŽ¢ãããããç¯å²ã¯ãA3:A11ãã ããé¢æ°ããã©ãã°ïŒã³ããŒãããšãã«ç¯å²ãããããããªãã®ã§çµ¶å¯Ÿåç
§ã«ããŠã$A$3:$A$11ããšãã
âåçªå·ïŒ1
æœåºãããåã¯ç¯å²äžã®å·Šããæ°ããŠ1åç®ãªã®ã§ã1ããšãã
âæ€çŽ¢æ¹æ³ïŒ0
æ€çŽ¢ãã圢åŒã¯å®å
šäžèŽã§ããã®ã§ã0ããŸãã¯ãFALSEããšãã
ããããå
¬åŒã«ããŠã¯ãããš
=VLOOKUP(C3,$A$3:$A$11,1,0)
2ã#N/AãïŒãšã©ãŒãæå³ãã
â æå®ã®æ¡ä»¶ã§ã¯äžèŽããããŒã¿ãèŠåœãããªãã£ããšããããšã§ã
3ãã®ã»ã«D3ã®é¢æ°ãäžæ®µãŸã§ãªãŒããã£ã«ã³ããŒïŒâ»ãªãŒããã£ã«ã®ããæ¹ïŒ
4å šã»ã«ã®ããŒã¿ã衚瀺ããã
ãã®æ»ãå€ïŒè¡šç€ºãããããŒã¿ïŒã«ãã£ãŠéè€ãããããªãããå€å¥ãã
衚瀺ãããæ»ãå€ãã»ã»ã»
- ã#N/AããªãâãããŒã¿ã«éè€ãªã
- æ€çŽ¢å€ãšåãå€ãªãâãããŒã¿éè€ããïŒããã€éè€ããŠãããã¯ããããªãïŒ
VLOOKUPã䜿ã£ãæ¹æ³ã¯ãæ€çŽ¢å€ã«äžèŽããããŒã¿ãæœåºããŠãããã®ã§COUNTIFé¢æ°ãšã¯éããéè€ãããã€ãã£ãããŸã§ã¯å€å¥ããããšãã§ããŸããã
éè€ããããããªããããããããã°OKãšãããšãåãã®æ¹æ³ã§ãã
çªå€ç·šïŒVLOOKUPã®ãšã©ãŒå€ã#N/Aããå¥æåã«å€æããŠè¡šç€ºãããæ¹æ³
VLOOKUPé¢æ°ã®éè€ãã§ãã¯ã§è¡šç€ºãããã#N/Aãã®ãšã©ãŒå€ã
å ã»ã©ã®äŸã§ã¯ããããéæ¥çã«éè€ãã·ã«å€å¥ããŠããŸãããã#N/Aããæåããå¥ã®æåã«çœ®ãæããŠè¡šç€ºãããããšãå¯èœã§ãã
ããã«ã¯IFERRORé¢æ°ïŒã€ããšã©ãŒé¢æ°ïŒã䜿ããŸãã
IFERRORé¢æ°ã®å ¬åŒ
=IFERROR ( å€, ãšã©ãŒã®å Žåã®å€)
å€ïŒãšã©ãŒå€å®ãããé¢æ°åŒãæ°åŒãå
¥å
ãšã©ãŒã®å Žåã®å€ïŒãšã©ãŒã®ãšãã«è¡šç€ºããããæååãé¢æ°åŒãæ°åŒãå
¥å
ããã»ã©VLOOKUPé¢æ°ã®äŸã§æ±ããããŒã¿ããã®ãŸãŸäœ¿ã£ãŠããšã©ãŒå€ããéè€ãªãããšããæåã§è¡šç€ºãããŠã¿ãŸãã
äŸïŒVLOOKUPé¢æ°ã䜿ã£ãŠéè€ãã§ãã¯ããããŸããšã©ãŒã®æã¯ãéè€ãªãããšè¡šç€ºãããã
1IFERRORé¢æ°ãå ¥åããŠãã
âå€ïŒVLOOKUP(C3,$A$3:$A$11,1,0)
ãšã©ãŒå€å®ãããé¢æ°åŒã¯ããã®ãŸãŸéè€ããã§ãã¯ããåŒã䜿ã£ãŠãVLOOKUP(C3,$A$3:$A$11,1,0)ããšãã
âãšã©ãŒã®å Žåã®å€ïŒ"éè€ãªã"
ãšã©ãŒã®ãšãã«è¡šç€ºããããæååãéè€ãªããªã®ã§ã"ãã§å²ã£ãŠã"éè€ãªã"ããšãã
å
¬åŒã«ããŠã¯ãããšä»¥äžã«ãªã
=IFERROR(VLOOKUP(C3,$A$3:$A$11,1,0),"éè€ãªã")
2ãšã©ãŒå€ãšãªããšããããéè€ãªãããšè¡šç€ºãããããã«ãªã
ããšã¯ãå šã»ã«ãåŠçããããã°ã»ã«D3ã®é¢æ°åŒããªãŒããã£ã«ã³ããŒããã ãã§OKïŒâ»ãªãŒããã£ã«ã®ããæ¹ïŒ
èªåã䜿ãã ãã®ããŒã¿ã§ããã°ã#N/Aãã§ãååã§ããã第äžè ãç®ã«éããã®ã§ããã°ãããªã²ãšå·¥å€«ãæ°ã¥ãããšããŠçŽ æµã§ãããã
CASE2ïŒExcel(ãšã¯ã»ã«)ã§éè€ããããŒã¿ãåé€ããæ¹æ³
éè€ããããŒã¿ãèŠã€ããŠãã®ãŸãŸåé€ããããšãã§ããŸãã
ãéè€ãåé€ããšããæ©èœã䜿ãã°ãåãåã«ããéè€ããŒã¿ãäžç¬ã§èªååé€ããããšãã§ããŸãã
ãã®æ©èœèªäœã¯ãåããŒã¿ïŒçžŠäžŠã³ã®ããŒã¿ïŒãã«ãã䜿ããŸãããã
å°ã工倫ããã°ãè¡ããŒã¿ïŒæšªäžŠã³ã®ããŒã¿ïŒãã«ã察å¿ããããšãã§ããã®ã§æ¹æ³ã2ã€çŽ¹ä»ããŠãããããšæããŸãã
åããŒã¿ïŒçžŠäžŠã³ããŒã¿ïŒã®éè€ãæ¶ãå Žå
ãŸãã¯åããŒã¿ã®éè€åé€ã®æ¹æ³ã§ãã
äŸïŒAåã«ããããŒã¿ã®éè€ãåé€ããã
1ãŸãã¯AåããŸãã£ãšç¯å²éžæããŠãããŒã¿ã¿ãã«ãããéè€ãåé€ããã¯ãªãã¯
2ãããã¢ãããéãã®ã§éè€ãåé€ãããåã«ãã§ãã¯ããŒã¯ãå
¥ã£ãŠããã®ã確èªããŠOKãã¿ã³ãæŒã
3ãéè€ãã1åã®å€ãèŠã€ãããåé€ãããŸãããäžæã®å€ã7åæ®ã£ãŠããŸãããšãããã¢ãããéãã°éè€ã®åé€å®äº
ãããããã®ããŒã¿ã1ã€æ¶ããŸãããïŒ
ããéè€ããŒã¿ãååšããªãå Žåã¯ãéè€ããå€ã¯èŠã€ãããŸããã§ããããšè¡šç€ºãããŸãã
è¡ããŒã¿ïŒæšªäžŠã³ããŒã¿ïŒã®éè€ãæ¶ãå Žå
ä»åºŠã¯ ã²ãšæéå ããŠè¡ããŒã¿ã®éè€ãæ¶ããŠã¿ãããšæããŸãã
æ¹æ³ãšããŠã¯ãããŒã¿ã瞊ã«ããŠéè€ãåé€ããããã§ãã1å暪䞊ã³ã«çŽãã£ãŠããåçŽãªäœæ¥ã§ãã
äŸïŒAã®è¡ããŒã¿ã®éè€ãåé€ããã
1ãŸãè¡ããŒã¿å
šäœããŸãã£ãšç¯å²éžæãé©åœãªã»ã«ã«ã«ãŒãœã«ã眮ããç¶æ
ã§ãããŠã¹å³ã¯ãªãã¯âã圢åŒãéžæããŠè²Œãä»ãããã¯ãªãã¯ãã
ãããã¢ããã§è¡åãå
¥ãæ¿ãããéžæããŠOKãã¿ã³ãã¯ãªãã¯
2貌ãä»ãããã瞊ããŒã¿ãéžæããŠããŒã¿ã¿ãã®ãéè€ãåé€ããã¯ãªãã¯
ãããã¢ãããéãããOKãã¿ã³ãæŒããŠéè€ãåé€ãã
3éè€ã®æ¶ãã瞊ããŒã¿å
šäœãã³ããŒããŠé©åœãªã»ã«ã«ã«ãŒãœã«ã眮ããããäžåºŠåãæäœã§è¡åãå
¥ãæ¿ãã
ããã§ãéè€ã®æ¶ããç¶æ
ã®åããŒã¿ïŒæšªäžŠã³ããŒã¿ïŒãåºæ¥äžãããŸããïŒ
ããšã¯ãäžèŠãªããŒã¿ã¯æ¶ãããããŠèŠãç®ãæŽããŠããã£ããã°ã£ã¡ãã§ãã
ã¡ãã£ãšã²ãšæéããããŸãããã©ãããŠãè¡ããŒã¿ã§éè€ãåé€ãããå Žåã¯äœ¿ã£ãŠã¿ãŠãã ããã
以äžãä»æ¥ã¯ãããŒã¿ã®éè€ããã§ãã¯ããæ¹æ³ããåé€ããæ¹æ³ãã玹ä»ããŠããŸããã
ç°¡åãªæäœãªã®ã§ãã²æŽ»çšããŠã¿ãŠãã ããïŒ
ãã®èšäºãèŠãŠãã人ã«ããããã®æ¬ïŒAmazonã¬ãã¥ãŒïŒïŒ