ไปยังเนื้อหาหลัก

วิธีการรวมค่าตามเกณฑ์ข้อความใน Excel

ใน Excel คุณเคยพยายามรวมค่าตามคอลัมน์อื่นของเกณฑ์ข้อความหรือไม่? ตัวอย่างเช่นฉันมีช่วงของข้อมูลในแผ่นงานดังภาพหน้าจอต่อไปนี้ที่แสดงตอนนี้ฉันต้องการเพิ่มตัวเลขทั้งหมดในคอลัมน์ B ที่สอดคล้องกับค่าข้อความในคอลัมน์ A ที่ตรงตามเกณฑ์ที่กำหนดเช่นรวมตัวเลขหาก เซลล์ในคอลัมน์ A มี KTE

doc-sum-based-on-text-1

รวมค่าตามคอลัมน์อื่นหากมีข้อความบางข้อความ

รวมค่าตามคอลัมน์อื่นหากขึ้นต้นด้วยข้อความบางข้อความ

รวมค่าตามคอลัมน์อื่นหากลงท้ายด้วยข้อความบางข้อความ

รวมค่าตามคอลัมน์อื่นหากเป็นข้อความบางข้อความ


ลูกศรสีฟ้าฟองขวา รวมค่าตามคอลัมน์อื่นหากมีข้อความบางข้อความ

ลองใช้ข้อมูลข้างต้นเพื่อเพิ่มค่าทั้งหมดเข้าด้วยกันซึ่งมีข้อความ“ KTE” ในคอลัมน์ A สูตรต่อไปนี้อาจช่วยคุณได้:

กรุณาใส่สูตรนี้ = SUMIF (A2: A6, "* KTE *", B2: B6) ลงในเซลล์ว่างแล้วกด เข้าสู่ จากนั้นตัวเลขทั้งหมดในคอลัมน์ B ที่เซลล์ที่เกี่ยวข้องในคอลัมน์ A มีข้อความ "KTE" จะรวมกัน ดูภาพหน้าจอ:

doc-sum-based-on-text-2
-1
doc-sum-based-on-text-3

ปลาย: ในสูตรข้างต้น A2: A6 คือช่วงข้อมูลที่คุณเพิ่มค่าตาม * KTE * หมายถึงเกณฑ์ที่คุณต้องการและ B2: B6 คือช่วงที่คุณต้องการรวม


ลูกศรสีฟ้าฟองขวา รวมค่าตามคอลัมน์อื่นหากขึ้นต้นด้วยข้อความบางข้อความ

หากคุณต้องการรวมค่าเซลล์ในคอลัมน์ B โดยที่เซลล์ที่เกี่ยวข้องในคอลัมน์ A ซึ่งข้อความขึ้นต้นด้วย "KTE" คุณสามารถใช้สูตรนี้ได้: = SUMIF (A2: A6, "KTE *", B2: B6)ดูภาพหน้าจอ:

doc-sum-based-on-text-4
-1
doc-sum-based-on-text-5

ปลาย: ในสูตรข้างต้น A2: A6 คือช่วงข้อมูลที่คุณเพิ่มค่าตาม KTE * หมายถึงเกณฑ์ที่คุณต้องการและ B2: B6 คือช่วงที่คุณต้องการรวม


ลูกศรสีฟ้าฟองขวา รวมค่าตามคอลัมน์อื่นหากลงท้ายด้วยข้อความบางข้อความ

หากต้องการเพิ่มค่าทั้งหมดในคอลัมน์ B โดยที่เซลล์ที่เกี่ยวข้องในคอลัมน์ A ซึ่งข้อความลงท้ายด้วย "KTE" สูตรนี้สามารถช่วยคุณได้: = SUMIF (A2: A6, "* KTE", B2: B6), (A2: A6 คือช่วงข้อมูลที่คุณเพิ่มค่าตาม KTE * หมายถึงเกณฑ์ที่คุณต้องการและ B2: B6 คือช่วงที่คุณต้องการรวม) ดูภาพหน้าจอ:

doc-sum-based-on-text-6
-1
doc-sum-based-on-text-7

ลูกศรสีฟ้าฟองขวา รวมค่าตามคอลัมน์อื่นหากเป็นข้อความบางข้อความ

หากคุณเพียงต้องการรวมค่าในคอลัมน์ B ซึ่งเนื้อหาของเซลล์ที่เกี่ยวข้องเท่านั้นคือ "KTE" ของคอลัมน์ A โปรดใช้สูตรนี้: = SUMIF (A2: A6, "KTE", B2: B6), (A2: A6 คือช่วงข้อมูลที่คุณเพิ่มค่าตาม KTE หมายถึงเกณฑ์ที่คุณต้องการและ B2: B6 คือช่วงที่คุณต้องการรวม) จากนั้นเฉพาะข้อความคือ "KTE" ในคอลัมน์ A ซึ่งจะเพิ่มจำนวนสัมพัทธ์ในคอลัมน์ B ดูภาพหน้าจอ:

doc-sum-based-on-text-8
-1
doc-sum-based-on-text-9

Advanced Combine Rows: (รวมแถวที่ซ้ำกันและผลรวม / ค่าเฉลี่ยที่สอดคล้องกัน):
  • 1. ระบุคอลัมน์หลักที่คุณต้องการรวมคอลัมน์อื่นตาม;
  • 2. เลือกการคำนวณหนึ่งรายการสำหรับข้อมูลรวมของคุณ

doc-sum-column-one-criteria-7

Kutools สำหรับ Excel: ด้วย Add-in ของ Excel ที่มีประโยชน์มากกว่า 200 รายการให้ทดลองใช้ฟรีโดยไม่มีข้อ จำกัด ใน 60 วัน ดาวน์โหลดและทดลองใช้ฟรีทันที!


บทความที่เกี่ยวข้อง:

จะรวมทุก n แถวลงใน Excel ได้อย่างไร

วิธีการรวมเซลล์ด้วยข้อความและตัวเลขใน Excel

สุดยอดเครื่องมือเพิ่มผลผลิตในสำนักงาน

🤖 Kutools AI ผู้ช่วย: ปฏิวัติการวิเคราะห์ข้อมูลโดยยึดตาม: การดำเนินการที่ชาญฉลาด   |  สร้างรหัส  |  สร้างสูตรที่กำหนดเอง  |  วิเคราะห์ข้อมูลและสร้างแผนภูมิ  |  เรียกใช้ฟังก์ชัน Kutools...
คุณสมบัติยอดนิยม: ค้นหา เน้น หรือระบุรายการที่ซ้ำกัน   |  ลบแถวว่าง   |  รวมคอลัมน์หรือเซลล์โดยไม่สูญเสียข้อมูล   |   รอบโดยไม่มีสูตร ...
การค้นหาขั้นสูง: VLookup หลายเกณฑ์    VLookup หลายค่า  |   VLookup ข้ามหลายแผ่น   |   การค้นหาที่ไม่ชัดเจน ....
รายการแบบเลื่อนลงขั้นสูง: สร้างรายการแบบหล่นลงอย่างรวดเร็ว   |  รายการแบบหล่นลงขึ้นอยู่กับ   |  เลือกหลายรายการแบบหล่นลง ....
ผู้จัดการคอลัมน์: เพิ่มจำนวนคอลัมน์เฉพาะ  |  ย้ายคอลัมน์  |  สลับสถานะการมองเห็นของคอลัมน์ที่ซ่อนอยู่  |  เปรียบเทียบช่วงและคอลัมน์ ...
คุณสมบัติเด่น: กริดโฟกัส   |  มุมมองการออกแบบ   |   บาร์สูตรใหญ่    สมุดงานและตัวจัดการชีต   |  ห้องสมุดทรัพยากร (ข้อความอัตโนมัติ)   |  เลือกวันที่   |  รวมแผ่นงาน   |  เข้ารหัส/ถอดรหัสเซลล์    ส่งอีเมลตามรายการ   |  ซุปเปอร์ฟิลเตอร์   |   ตัวกรองพิเศษ (กรองตัวหนา/ตัวเอียง/ขีดทับ...) ...
ชุดเครื่องมือ 15 อันดับแรก12 ข้อความ เครื่องมือ (เพิ่มข้อความ, ลบอักขระ, ... )   |   50 + แผนภูมิ ประเภท (แผนภูมิ Gantt, ... )   |   40+ ใช้งานได้จริง สูตร (คำนวณอายุตามวันเกิด, ... )   |   19 การแทรก เครื่องมือ (ใส่ QR Code, แทรกรูปภาพจากเส้นทาง, ... )   |   12 การแปลง เครื่องมือ (ตัวเลขเป็นคำ, การแปลงสกุลเงิน, ... )   |   7 ผสานและแยก เครื่องมือ (แถวรวมขั้นสูง, แยกเซลล์, ... )   |   ... และอื่น ๆ

เพิ่มพูนทักษะ Excel ของคุณด้วย Kutools สำหรับ Excel และสัมผัสประสิทธิภาพอย่างที่ไม่เคยมีมาก่อน Kutools สำหรับ Excel เสนอคุณสมบัติขั้นสูงมากกว่า 300 รายการเพื่อเพิ่มประสิทธิภาพและประหยัดเวลา  คลิกที่นี่เพื่อรับคุณสมบัติที่คุณต้องการมากที่สุด...

รายละเอียด


แท็บ Office นำอินเทอร์เฟซแบบแท็บมาที่ Office และทำให้งานของคุณง่ายขึ้นมาก

  • เปิดใช้งานการแก้ไขและอ่านแบบแท็บใน Word, Excel, PowerPoint, ผู้จัดพิมพ์, Access, Visio และโครงการ
  • เปิดและสร้างเอกสารหลายรายการในแท็บใหม่ของหน้าต่างเดียวกันแทนที่จะเป็นในหน้าต่างใหม่
  • เพิ่มประสิทธิภาพการทำงานของคุณ 50% และลดการคลิกเมาส์หลายร้อยครั้งให้คุณทุกวัน!
Comments (22)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
I try already.cause I apply the whole range it's still could not get the total sum. I am used sumif
This comment was minimized by the moderator on the site
i need to reference my sumifs criteria to a specific cell, the cell acts as a filter
EG: =SUMIFS(LV215:LV237,WC7,AB215:AB237) where WC7 is equal to a specific cell is this possible?
This comment was minimized by the moderator on the site
i cannot find this tool. "Combine Rows Based on Column" at the top of the page. i also cannot find info on what is on the free version vs. what is on the paid version. is this on the paid version? if not, where is it? thanks!
This comment was minimized by the moderator on the site
Hello, jenna,
We have moved this feature under the Merge & Split group, please see the below screenshot.
Sorry for this inconvenience.
Please try, thank you!
This comment was minimized by the moderator on the site
I create a dynamic string which contains the cells to sum and pass this string to sum function and it gives me #value error. Any solution to this.
This comment was minimized by the moderator on the site
Hi, Desu,
Could you give your problem more detailed, thank you!
This comment was minimized by the moderator on the site
By the way, I’m using the =SUMIF(A2:A6,"*KTE*",B2:B6) formula, and I want to do more than just the B column (up to column AM).
This comment was minimized by the moderator on the site
Hello, Paige,
For solving your problem, may be there is no simple formula, you should join the SUMIF function together to get the result as you need, for example, you can use the below formula: (you can add other columns data with combining the sumif function)

=SUM(SUMIF(A2:A6,"*kte*",B2:B6), SUMIF(A2:A6,"*kte*",C2:C6), SUMIF(A2:A6,"*kte*",D2:D6))

Please try it, hope it can help you!
This comment was minimized by the moderator on the site
This works but what if I want to use the last part of the formula to cover multiple columns instead of just one?
This comment was minimized by the moderator on the site
how do I use a sumif in the following. If a certain cell contains the values of an substring of data, than sum a nearby column. for example, Cell A1 has (Dan,Tom,Bill,Smith). Then a separate table has Dan - 2, Bill - 3, John - 4. Assuming that is a 2x3 table. I want to create a formula that can sum the Dan and Bill numbers (2+3) because those texts could be found in cell A1. So the total would return 5.
This comment was minimized by the moderator on the site
How do you us sumif formula to with two criteria? For instance, If Column A = X and Column C = C then Sum Column G.
This comment was minimized by the moderator on the site
Hello, Matusiak
To sumif values based on multiple criteria, please view the following screenshot:

Also, you can go to the article https://www.extendoffice.com/documents/excel/2471-excel-sumif-multiple-criteria.html to get your solution.
This comment was minimized by the moderator on the site
Hi, any one here is having an idea of how to calculate value containing in a cell (Or with text?
For Example: in Cell A= MR134 , B= MR143, C = MR187 and result will be like sum of 134+143+187 =?
This comment was minimized by the moderator on the site
I am looking for this solution too.
This comment was minimized by the moderator on the site
Hello, guys,
May be the below array formula can help you: (after typing the formula, please press Ctrl+Shift+Enter together)
=SUM(IF(ISNUMBER(SEARCH("MR",B1:B4)),SUBSTITUTE(B1:B4,"MR",""))+0)
Please change the cell references to your need.
This comment was minimized by the moderator on the site
This is super clear and understandable, thank you so much!!!
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