Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I want to evaluate a mathematical function existing in some cell in Microsoft Excel with some value from other cell, let say that in the A1 cell the user writes “X^2+2X+5” and in the cell A2 writes 3, I want to obtain the result on A3 equals to 20 (the function evaluation for X=3). The idea is writing a macro that has two parameters, the first one, the expression and the other the variable value. Where can I find the code (VB Excel Macro) for doing this without starting from zero? Thanks.
You can use Application.Evaluate, e.g.
application.Evaluate(replace([A1],"X",[A2]))
You'll have to update your formula to X^2+2*X+5
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 7 months ago.
Improve this question
I have something like that on Excel
row
G
H
2
Manual
810
3
Manual
600
I want the Cell to check if any G column says Manual, and for every one it does it will then SUM the H column, if it doesn't, it does nothing, the only way I could do it was as bellow:
=IF(((G2)="Manual");SUM(H2);"")+IF(((G3)="Manual");SUM(H3);"")
If I try something like:
=IF((($G$2:$G$3)="Manual");SUM($H$2:$H$3);"")
It just give me an error stating an array value could not be found
I have other 99 items and I would like to keep it as clean as possible, can anyone assist?
Below all formula should work for you.
=SUMIFS(H:H,G:G,"Manual")
=SUMPRODUCT((H:H)*(G:G="Manual"))
=SUM(FILTER(H:H,G:G="Manual"))
=SUM(IF(G:G="Manual",H:H,0))
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 9 years ago.
Improve this question
I have the following data in a spreadsheet:
I
I need a formula/workaround that would give me the following:
Thanks,
You can reference and repeat data by using the INDEX function.
Placing the formula =INDEX(A:A,FLOOR((ROW()+4)/5,1),1) into a cell on the first row (B1, C1, etc.) and copying down will repeat everything in column A 5 times.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 9 years ago.
Improve this question
A1 = 317.84, B1 = 422.79.
Cell A1 and B1 performs a SUM on couple of numbers that are calculated through basic math operators and a ROUND function.
Calling the following function in a nearby cell:
=SQRT(A1*A1+B1*B1) constantly yields a 0.
Edit: this actually applies to any function that contains any of those two cells
Now this problem is reproducible but clearly doesn't make any sense.
Some Information That Might Help
Working on Excel 2010
I did add some VBA code but it has nothing to do with the functions
A download link of the file:
http://speedy.sh/QaZ7Z/.xlsm
http://speedy.sh/bfMZM/.xlsx
See cells BY35:BW35
Any ideas what might lead to that?
The reason is that you have circular references in BX68, BW68, BU68, BS68, BR68. Change in each of this cells 68 to 67. Correct formulas:
BX68: =SUM(BX65:BX67)
BW68: =SUM(BW65:BW67)
BU68: =SUM(BU65:BU67)
BS68: =SUM(BS65:BS67)
BR68: =SUM(BR65:BR67)
A guide for finding circular references easly: http://blogs.mccombs.utexas.edu/the-most/2012/06/22/find-circular-references-in-excel/
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
This question does not appear to be about programming within the scope defined in the help center.
Improve this question
Evening all:
I am trying to sum number values from a column based off a value from a different. How can I do this? =Sum(A)? I want to add the values of A based off the 10 from B.
Here is a simple screen shot of what I want to try to do:
You can use a SUMIF to accomplish what I believe you are going for. In cell C1 in your example:
=SUMIF(B:B,B1,A:A)
That would put the sum next to each occurrence of the value in column B. You could copy only the uniques from column B and do the same if that is what you're looking for:
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
This question does not appear to be about programming within the scope defined in the help center.
Improve this question
I have an excel that looks like this:
I need a formula that will prompt 'NOK' (or 'OK') when the size is not with the range (Lowest & Highest). The expected output should looks like this:
For O2, your formula would be:
=IF(AND(L2<=M2, L2>=M2),"OK","NOK")
and of course, you can drag it down for all other cells under column O