From a formula I got a result {9,16;4,4;1,1}(this is after selecting and pressing F9). Now I need to get the sum but in the following form {25;8;2}. Using sum gives just one number 35. Can this be done and if yes then how?
I know this can be done using VBA, but I need to implement in base excel.
Any help is useful, and thanks in advance.
Would this work:
=MMULT(<YourArray>,{1;1}))
Related
I'm trying to rank the following items based on price using the following formula =SUMPRODUCT(([Item]=[#Item])*([#Price]<[Price]))+1, but it isn't returning any results:
When I use the same formula in the following test table it works, =SUMPRODUCT(($A$2:$A$7=A2)*(B2<$B$2:$B$7))+1:
Can someone please let me know what I am doing wrong? Thanks
EDIT 2 : Evaluation https://imgur.com/a/eXIYPAP
Your formula works fine for me.
Are you sure that A2 and A3 are the same value? There may be some hidden white space causing problems. Just try
=A2=A3
in another cell to make sure they are the same.
USE COUNTIFS INSTEAD
I don't know why your formula isn't working, however, I would suggest avoiding SUMPRODUCT where you can.
=COUNTIFS([Item],[#Item],[Price],">"&[#Price])+1
This will count the number of prices higher than the current one for each item (+1, if you want the rank to start at 1 instead of 0)
If your goal is to get the ranking for each unique item, =SUMPRODUCT(([Item]=[#Item])*([Price]>[#Price]))+1 should do the trick. If the goal is to get the ranking based only on price, don't have it figured out yet.
Well, I tried to make a formula on Excel 2010 in order to get flexible results.
The idea is to count cell written less cells empty, so the formula should be: =CONTAR(C10:C69) - CONTAR.BLANCO(C10:C[VALUE])Where the Value is 8 + the result of CONTAR(C10:C69).
The real formula actually extends more than this, but I got stuck at this step.
That being said, how can I produce the same result using Visual Basic to actualize the list every time excel is modified?
Thanks in advance!
EDIT: thank you for the correction
The best way is to use Index to return a reference to the range from C10 to C[Value]
=COUNT(C10:C69)-COUNTBLANK(C10:INDEX(C:C,8+COUNT(C10:C69)))
(I hope I have got the correct equivalent functions for Contar etc.)
I'm trying to achieve something like in the picture attached. I could able to achieve rest but calculation of Highlighted part. Formula or VBA code is preferred. Here is the image for what I'm trying to achieve.-
I could able to solve it by sumifs method as told by Jeeped.Formula goes Like
=SUMIFS(Sheet1!Column3:Column3,Sheet1!Column1:Column1,Sheet2!Column2-row1value,,Sheet1!Column2:Column2,Sheet2!Column1-row2value)
Thanks Guys
I'd like to use countifs in VBA without knowing the amount of criteria/ranges. So in the example below, my script would see that there were 2 criterias, and apply 2 sets of criteria/ranges.
How do I do this in VBA, I can do everything apart from put it in the countifs formula. I tried putting it in a string/variant, ie: Application.Worksheetfunctions.Countifs(stringvariable) but it has not worked, I understand why it has not worked but I can't find a way to do this.
Thanks in Advance for your help.
1) Create the formula as a string
2) Use application.evaluate(var) to get the result
What I would like to do is something like this:
=SUM(A(ROW()):E(ROW()))
so this formula would take a sum of all the elements from column A to E in the current row.
Is this possible or should I take some other approach?
I have a lot of data that depends on the sum in this way and I don't want to waste time by typing for each row some other number so I'm trying to figure out how to GENERALIZE the formula.
Thank you in advance...
Well, if I get what you're looking for exactly, you could maybe use:
=SUM(INDEX(A:E,ROW(),1):INDEX(A:E,ROW(),5))
You could also use the shortcut for autosum: Alt+H+U