Output value based on number range entered in excel [closed] - excel

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I need to find a formula that I can use for any number, and have it output a number identified to correspond to that range.
For instance, I need to be able to input:
A number >2.50 and <7.49, and the formula spit out $0.05
A number >7.50 and <24.49, and the formula spit out $0.10
A number >25.00 and <74.99 and the formula spit out $0.50, and so on/so forth.

If you want to have a set of pre-defined values that you output as you showed in your example then I would use =VLOOKUP() like this:
Using this you can set what your desired output is in the table. Now I cannot tell if there is a pre-defined pattern you are using to determine your outputs, if so a simple math algorithm might make more sense than this.

It is possible to do this in a single formula:
=INDEX({0,0.05,0.1,0.5,10},MATCH(B1,{0,2.5,7.5,25,75},1))
You'll have to jiggle about with the cut-off points as you haven't stated clearly where the between values should fall, and what happens with larger or smaller values.

Related

Power Query - Combine Rows of data based on criteria [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 days ago.
Improve this question
an example of the data set I have is shown below: enter image description here
With this I want to be able to combine rows that have the same (Date, Scope & Category) and have the Val/COArea Crcy column sum together the rows values so I then have one row displaying the Date, Scope, Category, and value.
Hopefully this makes sense... Thanks!

Modifying an EXCEL formula in an automated process to save time [closed]

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 5 years ago.
Improve this question
So I have a table for values of jewelry, basically a formula is in place that calculates a few parameters off an inventory file, and then spits out the average price.
=IFERROR(AVERAGEIFS($S:$S,$B:$B,">=.10",$B:$B,"<=.19",$F:$F,"=VVS2",$E:$E,"=F",$A:$A,"=RD"), "-")
It looks like this:
Here's my issue though, I want to do that to hundreds of different table iterations. By iterations, I mean changing the jewelry/stone size. So .10-.19, .19-.29, all the way up to 11.0
Additionally, I'd like to do these to 6 or so different jewelry shapes, the example I provided is just for the keyword RD (ROUND).
Is there some automated way to modify the excel formula and sort of, plug it in? I know that's not very specific, but what I know for sure, is there's no way I can spend the time manually changing every cell for every different parameter, that would take just forever haha.
Appreciate any thoughts or suggestions, thank you.
Short of writing a custom function with VBA, you could try the following approach:
Instead of hard-coding the parameters into the formula, put the parameters into cells and then refer to the cells in the formula. For example, put the values into the cells Z1 to Z6 like this:
Then you can change the formula to
=IFERROR(AVERAGEIFS($S:$S,$B:$B,">="&$Z$1,$B:$B,"<="&$Z$2,$F:$F,$Z$3,$E:$E,$Z$4,$A:$A,$Z$5), "-")
Now you can change any of the values in Z1 to Z6 to calculate with different parameters.

Errors in attempting to format dates in Excel [closed]

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 8 years ago.
Improve this question
I am having a small problem with splitting up dates using the Excel delimiter tool. Usually I am able to either do some quick format changes to 'Short Date' or delimit with a non-existent delimiter in order to use the DMY option to standardize format. However, I have exhausted both of those options and nonetheless the dates appear to be mismatched. That is, suppose I take RIGHT(A1,4) in order to obtain only the year for each cell containing a date. Some of these give me the correct year e.g. 1973 and some give me a large number e.g. 6340. Why might this be happening?
In excel dates stored as numbers: e.g. 01/01/2013 is 41275 and Right(A1,4) gives you 1275. Try this one instead:
=YEAR(A1)
or
=TEXT(A1,"yyyy")
first formula returns number 2013 and second formula returns text "2013"
UPD:
as follow up from comments, since dates can be stored as text or as dates, this one works:
=RIGHT(TEXT(A1,"mm/dd/yyyy;#"),4)

Functions constantly returns a '0' [closed]

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/

Excel VBA add entire row and average [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Lets say I want to average every non empty cell on sheet 1 column j how would I accomplish this?
=AVERAGE(Sheet1!$J:$J)should be all you need! :-)
Let's do a SumProduct and Count -IF for the non-zero numbers only. In this solution, it also consideres negative numbers (SumProduct formula). Then use those two results to count given that AVERAGE is good yet it takes zeros in to consideration. If you don't have zeros but just texts and numbers, you are better off with AVERAGE, otherwise give this a try and adjust the logic accordingly (to consider negative numbers or not):
Depending on the version you are using, you can try out AVERAGEIF as well.

Resources