I need the formula to sum the values of variables based on similarity. The attached file explains the question.
thx. in advance
I need the formula to sum the values of variables based on similarity. The attached file explains the question.
thx. in advance
You can use this formula in cell K10:
=SUMIF($A$10:$A$15,J10,$B$10:$B$15)+SUMIF($E$10:$E$15,J10,$F$10:$F$15)
then copy down.
Hope this helps.
Pete
K10=SUMIF($A$10:$A$15,$J10,$B$10:$B$15)+SUMIF($E$10:$E$15,$J10,$F$10:$F$15) and drag down.
Notice my main language is not English.
I appreciate it, if you reply on my solution.
If you are satisfied with the solution, please mark the question solved.
You can add reputation by clicking on the star * add reputation.
Thx. for your reply
I forgot to explain that, the sequence of variables (A,B, C,D, E and F) is not fixed in both ranges. I need the formula which able to search on variable A, for example, in both ranges, and if they match, do the sum operation of A values.
That is what the offered formula does.
What is the problem you have with the offered solution.
but How do I search on a variable in a range and put one of two values in the cell that belongs to this variable? like in the attached file
Last edited by ahmadjumaa80; 07-17-2022 at 03:17 PM.
Both formulae that you were given look for the value from cell J10 to see if it exists in column A and adds the corresponding value from column B for any row where there is a match. It also does this looking down column E and adds any values from column F where column E matches J10.
As the formula is copied down, J10 becomes J11, then J12 and so on, so your "search variable" is whatever is in column J on any particular row.
Hope this helps.
Pete
EDIT: Ah, you have now attached a new file - give me a few minutes to review that one.
Pete
I'm sorry, this new file bears no resemblance to the first file, and gives no details of what you want to happen to the B and D data.
Pete
sorry for disruption
I Have two ranges, K5:L8, Range 2, O5:Q8. I need to distribute the values of Both ranges on the Rang 3, B6:B15 based on the value od C (Q4) such that if the value of Q4 is 1, the name has the value 50 otherwis it takes its value from L5:L8
This is a totaly differant question.
Based on your data.
C6=IF(Q5=1,50,$L5) and drag down.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks