- To post as a guest, your comment is unpublished.· 6 months agoHello, 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)))
Hoe optellen op basis van kolom- en rijcriteria in Excel?
Ik heb een gegevensbereik dat rij- en kolomkoppen bevat, nu wil ik een som nemen van de cellen die voldoen aan zowel de criteria voor kolom- als rijkoppen. Om bijvoorbeeld de cellen bij elkaar op te tellen, is het kolomcriterium Tom en het rijcriterium Feb zoals in het volgende screenshot. In dit artikel zal ik enkele handige formules bespreken om het op te lossen.
Hier kunt u de volgende formules toepassen om de cellen op te tellen op basis van zowel de kolom- als de rijcriteria, doe dit als volgt:
Voer een van de onderstaande formules in een lege cel in waarin u het resultaat wilt uitvoeren:
En druk vervolgens op Shift + Ctrl + Enter toetsen samen om het resultaat te krijgen, zie screenshot:
Opmerking:: In de bovenstaande formules: Tom als Feb zijn de kolom- en rijcriteria die zijn gebaseerd op, A2: A7, B1: J1 bevatten de kolomkoppen en rijkoppen de criteria, B2: J7 is het gegevensbereik dat u wilt optellen.
You are guest
or post as a guest, but your post won't be published automatically.
- To post as a guest, your comment is unpublished.· 6 months agoIs 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?
- To post as a guest, your comment is unpublished.· 9 months agoIn the above example which formula should I use if I wanted calculate the sum of the amounts earned by Tom Ruby & Nicol in March?
- To post as a guest, your comment is unpublished.· 9 months agoHello, 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!
- To post as a guest, your comment is unpublished.· 9 months agoHello 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 againI 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.
- To post as a guest, your comment is unpublished.· 2 years agoIs 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)))
- To post as a guest, your comment is unpublished.· 2 years agoShould anyone have the same question, this is how I solved it (in Google Sheets, not tested in Excel):
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)
- To post as a guest, your comment is unpublished.· 4 months agoI 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
- To post as a guest, your comment is unpublished.· 4 months agoThank you so much! You made my day!! @TeSageDS
- To post as a guest, your comment is unpublished.· 3 years agohow would you do this same formula if you wanted to sum both Feb and March together? please help! thanks
- To post as a guest, your comment is unpublished.· 3 years agoHello,Angela,
To solve your problem, you just need to apply the below formula, please try it.
Hope it can help you!
- To post as a guest, your comment is unpublished.· 4 years agoBrilliant
- To post as a guest, your comment is unpublished.· 4 years agoWorth 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.
- To post as a guest, your comment is unpublished.· 4 years agoAwesome, this is the one what i was looking for. thanks for the help