I have survey data with rating survey responses "Excellent", "Very Good"."Good" or Poor. How do I replace these texts in excel with number range - "9-10", "7-8" or "0-6"
=CHOOSE(MATCH(A1,{"Excellent","Very Good","Good","Poor"},0),"9-10","7-8","5-6","0-4")
I made up the numbers, since your question showed 4 options and 3 results only.
This can be done with a simple =IF() construction, something like:
=IF(OR(A1=9,A1=10),"Excellent",
IF(OR(A1=7,A1=8),...),
...
)
Related
In our warehouse we have even/odd system of locations.
here is the example:
1-101-1
1-103-1
1-105-1
....
1-285-1
and
2-102-1
2-104-1
2-116-1
2-240-1
....
2-286-1
and have levels too
1-101-2
1-101-3
1-101-4
there have a lot of data, and I need sort like this:
example numbers:
1-101-1
2-130-1
1-131-1
1-150-2
2-132-3
3-229-5
4-262-1
4-286-5
7-267-1
5-239-1
6-270-1
7-267-3
I need sort like this:
1-101-1
2-130-1
1-131-1
2-132-3
4-286-5
4-262-1
3-229-5
5-239-1
6-270-1
7-267-1
7-267-1
point is first two numbers(1-101-1;2-102-1) goes from smallest to biggest, next two(3-285-1;4-286) goes from biggest to smallest and
5 - 6 goes again from smallest to biggest and with that system to the end
second thing for sort is middle number, that number will goes as first from smallest to biggest, then from biggest to smallest, and last number is level, that is same as level 1 but must be sorted as level one, or be near level 1 if there is 7-267-1 and 7-267-3
is there any solution? thanks
edit:
here is image for easier understanding because it is hard to explain
Thanks all for answers, especially Daniel who are an expert in Excel and understand what I need.
I mean there is not solution for sort like that without VBA, but Daniel show me that i was wrong. Thanks again.
That is what i need, but there are some errors, if you can help me with that
this is other example with other locations:
this is unsorted locations with formulas you give me
and this is sorted, but with bad order:
bad sort
and here is with errors:
errors
we have 120 rows, and numbers bigger then 99 display error, and number 22-250-1 goes in -25 in second row
I try formula with numbers you enter in this example, and i got same good sort as you, but after entering other places, there is some bad sort.
Welcome to StackOverflow!
I think I understand what is being requested. It's a bit difficult to explain but I'll give it a try.
The primary sorting is to be as follows:
If first digit is either 3 or 4, then it should be in descending order else ascending.
If the middle 3-digits are from a 3 or 4 numbered sequence (see #1 above), then the middle pair should be in descending order.
All sequences should be in ascending based on their final digit.
My solution breaks the sequence into distinct columns:
For example, create three columns: First, Second, Third.
Formula for First:
=INT(LEFT(A2, 1))
Formula for Second:
=INT(RIGHT(LEFT(A2,5), 3))
Formula for Third:
=INT(RIGHT(A2,1))
Next, we assign values for sorting these three fields:
Create a column labeled First_Sort_Pair:
=IF(OR(B2=1,B2=2),1,
IF(B2=3,3,
IF(B2=4,2,
IF(OR(B2=5,B2=6),4,
IF(OR(B2=7,B2=8),5,6)))))
Create a column labeled First_Sort:
=IF(OR(B2=3, B2=4), 2, 1)
Create a column labeled Second_Sort:
=IF(E2=4, 2, IF(E2=3, 3, 1))
Create a column labeled Sort_3_4:
=IF(OR(B2=3,B2=4),RANK(C2,C:C,0),)
You can now begin sorting:
[
Result:
You will now have your data sorted as intended:
I have these 2 IF statements in 2 seperate cells and would like to make them function in one cell. I have tried a few ways of combining but cannot make it work. Can an IF statement expert help me combine these 2?
1 st.
=IF(K21<0.01,("DTI Ratio Available "&TEXT(K21*-1,"$ 0.00")),("DTI Ratio Short by "&TEXT(K21,"$ 0.00")))
2nd.
=IF(K20<0.01,"Housing Ratio Available "&TEXT(K20*-1,"$ 0.00"),"Housing Ratio Short by "&TEXT(K20,"$ 0.00"))
Thank you very very much
Try this:
=CONCATENATE(
IF(K21<0.01,("DTI Ratio Available "&TEXT(K21*-1,"$ 0.00")),("DTI Ratio Short by "&TEXT(K21,"$ 0.00"))),
" ",
IF(K20<0.01,"Housing Ratio Available "&TEXT(K20*-1,"$ 0.00"),"Housing Ratio Short by "&TEXT(K20,"$ 0.00"))
)
I'm making an excel sheet for calculating z-score for infant weight/age (Input: "Baby Month Age", and "Baby weight"). To do that, I need get LMS parameters first for a specific month, from below table.
http://www.who.int/childgrowth/standards/tab_wfa_boys_p_0_5.txt
(For Integer Month number, this can be done by vlookup Method without issue.) For Non-Integer Month number, I need use some kind of "linear interpolation" approach to get an approximate LMS data.
The question is, both Trend method and Vlookup method are not working for me. For Trend method, it is not working as the raw data, like L parameters is not linear data, if I use Trend method, for the several top month, return data will far from existing data. As for Vlookup method, it just finds the closest month data.
I had to use multiple "Match" and "Index" Method to do the "linear interpolation" for myself. However, I wonder whether there is any existing function for that?
My current formula for L parameters is below:
=MOD([Month Age],1)*(INDEX('WHO BOY AGE WEIGHT'!A:D,MATCH([Month Age],'WHO BOY AGE WEIGHT'!A:A)+1,2)-INDEX('WHO BOY AGE WEIGHT'!A:D,MATCH([Month Age],'WHO BOY AGE WEIGHT'!A:A),2))+INDEX('WHO BOY AGE WEIGHT'!A:D,MATCH([Month Age],'WHO BOY AGE WEIGHT'!A:A),2)
If we assume that months increment always by 1 (no gap in month data), you can use something like this formula to interpolate between the two values surrounding the give non-integer value:
=(1-MOD(2.3, 1))*VLOOKUP(2.3,A:S,2)+MOD(2.3, 1)*VLOOKUP(2.3+1,A:S, 2)
Which interpolates L(2.3) from data of L(2) = .197 and L(3) = .1738, resulting in .19004.
You can replace 2.3 by any cell reference. You can also change the lookup column 2 for L into 3 for M, 4 for S etc.
To answer the question whether there is some direct "interpolate" function in Excel, not that I know about, although there is good artillery for statistical estimation.
Hey Stackoverflow users,
I have a spreadsheet from a survey I conducted for one of my classes. A big chunk of my spreadsheet is columns of numbers; they represent "strongly agree, agree, neutral, disagree and strongly disagree" and it's for personalities. I want to pick out certain numbers and see IF they are larger than 3 (neutral) and then output in a cell what that personality would be. If the number is less than 3 than it'd be some opposite personality.
I can provide an example with a picture if needed. My main question is...is it possible for a cell to collect data from different cells (not in a range) and output text in a single cell.
I've accomplished one personality.
=IF(M3>3,"Disorganized","Organized")
The only problem is that I am not doing M3=3 is "neutral."
Then I want to do that for 4 other columns and put them all in one cell.
This is the gist of the personality stuff
=IF(J3>3, "Creative", "Convential")
=IF(M3>3, "Disorganized", "Organized")
=IF(P3>3, "Introvert", "Extrovert")
=IF(T3>3, "Rude", "Nice")
=IF(V3>3, "Calm", "Insecure")
I want to get all 5 of them in one function in one cell and have a "both/neutral" output as well. So let's say one surveyee has 5,5,5,5 and 5, then the cell after all of them would say "Creative, Disorganized, Introvert, Rude, Calm." I hope this makes sense. Also, there are other columns between those specific columns.
Thanks for reading this far. Any help is appreciated.
= IF(J3=3,"Neutral", IF(J3>3, "Creative", "Convential")) & ", " &
IF(M3=3,"Neutral", IF(M3>3, "Disorganized","Organized")) & ", " &
...the rest of your formula here
So I'm not good with excel (computers in general) and can do some things but this one is out of my league.
This is the problem:
The cost of a used car is highly correlated with the following variables:
t= age of car 1 ≤ t ≤ 5 (years)
V= volume of engine 1000 ≤ V ≤ 2500 (cubic centimeters)
D= number of doors D= 2,3,4,5
A= accessories and style A= 1,2,3,4,5,6 (qualitative)
Using regression analysis, the following relationship between the cost and four independent variables was found:
purchase cost= (1+1/t)*V*(D/2+A)
Plot the purchase price of the car as a function of the four variables.
I know how to input the function into excel and only use one number from each variable:
Function:
=(1+(1/B2))*C2*((D2/2)+E2
Where: B2=1, C2=1000, D2=2, E2=1
Which: A1=4000 (for the purchase cost)
What I don't know is how to make the function use multiple number combinations within those variables (i.e. how to change one variable and not the others). I've looked up "youtube" videos and numerous websites to figure this out and none of them showed me what I needed to know. Any help would be greatly appreciated.
I think you have fundamentally solved your problem but there is a typo in your formula which is preventing it from calculating. Add a closing parenthesis at the end your formula. Then assuming that the formula is placed in cell A1 and your example values are placed in the cells indicated in your post, simply type a new numeric value in B2, C2, D2 and/or E2 'manually' and your formula result will update.
If you wish you can create a dropdown list in your cells to hold the list of values for each of your variables. This link should get you going.