انتقل إلى المحتوى الرئيسي

كيفية الجمع بناءً على معايير العمود والصف في Excel؟ 

لدي مجموعة من البيانات التي تحتوي على رؤوس الصفوف والأعمدة ، والآن ، أريد أن أحصل على مجموع الخلايا التي تفي بمعايير رأس العمود والصف. على سبيل المثال ، لتلخيص الخلايا التي تكون معايير العمود هي Tom ومعايير الصف هي فبراير كما هو موضح في لقطة الشاشة التالية. في هذه المقالة سأتحدث عن بعض الصيغ المفيدة لحلها.

معايير صف عمود doc sum 1

مجموع الخلايا استناداً إلى معايير العمود والصف مع الصيغ


السهم الأزرق الحق فقاعة مجموع الخلايا استناداً إلى معايير العمود والصف مع الصيغ

هنا ، يمكنك تطبيق الصيغ التالية لتجميع الخلايا بناءً على معايير العمود والصف ، يرجى القيام بذلك على النحو التالي:

أدخل أيًا من الصيغ أدناه في خلية فارغة حيث تريد إخراج النتيجة:

=SUMPRODUCT((A2:A7="Tom")*(B1:J1="Feb")*(B2:J7))

=SUM(IF(B1:J1="Feb",IF(A2:A7="Tom",B2:J7)))

ثم اضغط شيفت + كترل + إنتر مفاتيح معًا للحصول على النتيجة ، انظر لقطة الشاشة:

معايير صف عمود doc sum 2

ملاحظات: في الصيغ أعلاه: توم و فبراير هي معايير العمود والصف التي تستند إلى ، A2: A7, B1: J1 هي رؤوس الأعمدة ورؤوس الصفوف تحتوي على المعايير ، B2: J7 هو نطاق البيانات الذي تريد جمعه.

أفضل أدوات إنتاجية المكتب

🤖 مساعد Kutools AI: إحداث ثورة في تحليل البيانات على أساس: التنفيذ الذكي   |  إنشاء التعليمات البرمجية  |  إنشاء صيغ مخصصة  |  تحليل البيانات وإنشاء الرسوم البيانية  |  استدعاء وظائف Kutools...
الميزات الشعبية: البحث عن التكرارات أو تمييزها أو تحديدها   |  حذف الصفوف الفارغة   |  دمج الأعمدة أو الخلايا دون فقدان البيانات   |   جولة بدون صيغة 
سوبر بحث: معايير متعددة VLookup    VLookup ذات القيمة المتعددة  |   VLookup عبر أوراق متعددة   |   بحث غامض ....
قائمة منسدلة متقدمة: إنشاء القائمة المنسدلة بسرعة   |  القائمة المنسدلة التابعة   |  قائمة منسدلة متعددة التحديد ....
مدير العمود: إضافة عدد محدد من الأعمدة  |  نقل الأعمدة  |  تبديل حالة رؤية الأعمدة المخفية  |  مقارنة النطاقات والأعمدة 
الميزات المميزة: التركيز على الشبكة   |  عرض تصميم   |   شريط الفورمولا الكبير    مدير المصنفات والأوراق   |  مكتبة الموارد (النص السيارات)   |  منتقي التاريخ   |  اجمع أوراق العمل   |  تشفير/فك تشفير الخلايا    إرسال رسائل البريد الإلكتروني عن طريق القائمة   |  سوبر تصفية   |   مرشح خاص (تصفية غامق / مائل / يتوسطه خط ...) ...
أفضل 15 مجموعة أدوات12 نص الأدوات (إضافة نص, إزالة الأحرف، ...)   |   +50 رسم الأنواع (مخطط جانت، ...)   |   40+ عملي الصيغ (احسب العمر على أساس تاريخ الميلاد، ...)   |   19 إدخال الأدوات (أدخل رمز الاستجابة السريعة, إدراج صورة من المسار، ...)   |   12 تحويل الأدوات (أرقام إلى كلمات, نتيجة تحويل عملة، ...)   |   7 دمج وتقسيم الأدوات (الجمع بين الصفوف المتقدمة, تقسيم الخلايا، ...)   |   ... و اكثر

عزز مهاراتك في Excel باستخدام Kutools for Excel، واختبر كفاءة لم يسبق لها مثيل. يقدم Kutools for Excel أكثر من 300 ميزة متقدمة لتعزيز الإنتاجية وتوفير الوقت.  انقر هنا للحصول على الميزة التي تحتاجها أكثر...

الوصف


يجلب Office Tab الواجهة المبوبة إلى Office ، ويجعل عملك أسهل بكثير

  • تمكين التحرير والقراءة المبوبة في Word و Excel و PowerPointوالناشر والوصول و Visio والمشروع.
  • فتح وإنشاء مستندات متعددة في علامات تبويب جديدة من نفس النافذة ، بدلاً من النوافذ الجديدة.
  • يزيد من إنتاجيتك بنسبة 50٪ ، ويقلل مئات النقرات بالماوس كل يوم!
Comments (16)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
My data that I am trying to retrieve is in a table. Would this impact the result at all? I have:

=SUM(IF('[Primary Controller Active Project Database (KC notes)1.xlsx]Active Project Tracking'!$B2:$B66=X2,IF('[Primary Controller Active Project Database (KC notes)1.xlsx]Active Project Tracking'!$A1:$AV1=AH10,'[Primary Controller Active Project Database (KC notes)1.xlsx]Active Project Tracking'!$H$2:$AV$66)))

So I think the equivalent would be if you did your information above, but in a table in a different workbook. Thoughts?
This comment was minimized by the moderator on the site
If there were negatives in the matrix and you only wanted to include the positives, what would you do? 
I tried to do something like this:

=SUMPRODUCT((Column = Criteria)* ( Row = Criteria) * (second column = Criteria) * (Matrix) * (Matrix >0))

This comment was minimized by the moderator on the site
Is there a way to do this but instead of writing "Tom" & "Feb" in the formula, you are able to reference the criteria cells e.g.A11 & A12?
This comment was minimized by the moderator on the site
Hello, Rianna,Yest, as you said, you can use the cell references to replace the text in the formula, such as:
=SUMPRODUCT((A2:A7=A2)*(B1:J1=C1)*(B2:J7))
=SUM(IF(B1:J1=C1,IF(A2:A7=A2,B2:J7)))
This comment was minimized by the moderator on the site
In the above example which formula should I use if I wanted calculate the sum of the amounts earned by Tom Ruby & Nicol in March?
This comment was minimized by the moderator on the site
Hello, Nabar,To get the result you want, please apply the below formula:=SUMPRODUCT(((A2:A7="Tom")+(A2:A7="Nicol")+(A2:A7="Ruby"))*(B1:J1="Mar")*(B2:J7))
Please try, hope it can help you!
This comment was minimized by the moderator on the site
Hello Skyyang,
Thank you for your response. I tried the formula you suggested but I am not getting the right answer. Probably I wasn't able to put my query correctly. Let me try again I have a spreadsheet with data with daily calculation, I have numbered the first row 1,2,3,4.....132. 2nd, 3rd 4th &5th rows has table headings. The first column has line no's numbered 1, 2,3,.....3005 starting from row 6,range B6:EF3005 has data filled in on everyday basis. In second sheet i have a table in which I want to apply a formula which will look up two line numbers fed in two different rows and calculate the sum from the range B6: EF3005 from the data spreadsheet between the two line numbers from a certain column viz sum of values in column 15 between rows (line No's) 50 & 85.
This comment was minimized by the moderator on the site
Is there a way to make this work with wildcard characters? I'd like to use it on everything starting with certain characters, but with (a fixed number of) undefined characters at the end, i.e. =SUM(IF(B1:J1="Fe*",IF(A2:A7="To*",B2:J7)))
This comment was minimized by the moderator on the site
Should anyone have the same question, this is how I solved it (in Google Sheets, not tested in Excel):

=ArrayFormula(SUM(IF(regexmatch(O5:W5,"^Fe."),IF(regexmatch(N6:N11,"^To."),O6:W11))))

Note that the IF function does not support wildcard characters and that for regexmatch the wildcards are different and can be found here: https://github.com/google/re2/blob/master/doc/syntax.txt
In this particular instance, I used ^ to indicate that Fe & Tom occur at the beginning of text and . to allow for any following character (* would mean zero or more of the previous character, e.g. Fe* would only look for instances with 1 or more "e"s after F)
This comment was minimized by the moderator on the site
I tried to create a formula to calculate if the D12 is blank, it will calculate from K12 to AH12 but it seems this part ' regexmatch(D12,"")' is not working
ArrayFormula(SUM(IF(regexmatch(D12,""),K12:AH12)))
This comment was minimized by the moderator on the site
Thank you so much! You made my day!! @TeSageDS
This comment was minimized by the moderator on the site
how would you do this same formula if you wanted to sum both Feb and March together? please help! thanks

=SUMPRODUCT((A2:A7="Tom")*(B1:J1="Feb")*(B2:J7))
This comment was minimized by the moderator on the site
Hello,Angela,
To solve your problem, you just need to apply the below formula, please try it.

=SUMPRODUCT((A2:A7="Tom")*((B1:J1="Feb")+(B1:J1="Mar"))*(B2:J7)).

Hope it can help you!
This comment was minimized by the moderator on the site
Brilliant
This comment was minimized by the moderator on the site
Worth pointing out that of the two formulas provided above you do not need to enter the SUMPRODUCT formula with Ctrl + Shift + Enter. It will work perfectly well without it.
This comment was minimized by the moderator on the site
Awesome, this is the one what i was looking for. thanks for the help
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations