I have a value in cell AB8 and I want to conditionally return a status depending on which value it takes between 1 and 30.
I want to save time and rather than type the scores 1-9 indivdually to turn into "EMERGING" (etc) is there a way I can put a range in?
IFS(AB8=1,"EMERGING",AB8=2,"EMERGING",AB8=3,"EMERGING",AB8=4,"EMERGING",AB8=5,"EMERGING",AB8=6,"EMERGING",AB8=7,"EMERGING",AB8=8,"EMERGING",AB8=9,"DEVELOPING",AB8=10,"DEVELOPING",AB8=11,"DEVELOPING",AB8=12,"DEVELOPING",AB8=13,"DEVELOPING",AB8=14,"DEVELOPING",AB8=15,"DEVELOPING",AB8=16,"DEVELOPING",AB8=17,"SECURING",AB8=18,"SECURING",AB8=19,"SECURING",AB8=20,"SECURING",AB8=21,"SECURING",AB8=22,"SECURING",AB8=23,"SECURING",AB8=24,"SECURING",AB8=25,"READY",AB8=26,"READY",AB8=27,"READY",AB8=28,"READY",AB8=29,"READY",AB8=30,"READY")
Try this:
=INDEX({"EMERGING","DEVELOPING","SECURING","READY"},MATCH(AB8,{0,9,17,25},1))
Or create this table in, say, A1:B4:
0 Emerging
9 Developing
17 Securing
25 Ready
And then the formula is just:
=INDEX($B$1:$B$4,MATCH(AB8,$A$1:$A$4,1))
CallumDA's answer is more clean.
But this can be accomplished with nested IF formulas.
=IF(AB8>=1,IF(AB8<=8,"EMERGING",IF(AB8<=16,"DEVELOPING",IF(AB8<=24,"SECURING",IF(AB8<=30,"READY")))))
This one might also work,
=IF(AND(AB8>=1,AB8<=8),"EMERGING",IF(AND(AB8>=9,AB8<=16),"DEVELOPING",IF(AND(AB8>=17,AB8<=24),"SECURING",IF(AB8<=30,"READY","INVALID NUMBER"))))
Related
I am making an airplane reservation system on java. i got a sample database from online. only problem i have is the way the time is inputted.
and some times are 917 , or 22 , or 2. there is no 0 so i cannot just try and put a semicolon after 2 spaces.
Any one know if their is a way to do this, or some work around.
You can try:
=--TEXT(A1,"00\:00")
and format the result as "Time"
Edit:
I note you have changed your specifications to include that the times may be entered as the hour only: eg: 2 or 22. Try the revised formula below to handle that:
=--TEXT(IF(A1<=24,A1&"00",A1),"00\:00")
You can use the following formula:
=TIME(LEFT(A2,LEN(A2)-2),RIGHT(A2,2),)
A2 = the arrival time cell that you want to convert.
Also, make sure to change your output column to whatever time format you're looking for. Screenshot of results in action included.
I need some help. I rarely use IF statements in excel, I usually do Index Matches, VLookups etc. So when I came across this, I thought I could come here for some help.
I want to have an IF statement that returns 5 values.
In the picture attached, you'll see 5 levels.
If the value is less than or 0 then 5.
If the value is 0.01 - 5.99 then 4.
If the value is 6 - 12.99 then 3.
If the value is 13 - 29.99 then 2.
If the value is 30 or more then 1.
If anyone can help mem with this, that would be amazing!
Thank You!
It seems to me that this is what you need:
=IF(A8<=0,5,VLOOKUP(A8,$A$1:$B$4,2,TRUE))
I would just go with a vlookup like so:
=vlookup(D2,A4:B8,2,1)
If you are looking for a nested if formula and using the data set shown in the image of your question, then this will work:
=IF(A8=B1,A1,IF(OR(A8=B2,A8<=C2),A2,IF(OR(A8=B3,A8<=C3),A3,IF(OR(A8=B4,A8<=C4),A4,IF(A8=B5,A5,"Out of Range")))))
In this formula, I have used cell A8 as the reference value.
If you do not want to change the direction of your data, then using a nested if statement like the below should work:
If you do not want to use the lookup table, then will be easier to use the LOOKUP function with constants:
=LOOKUP(A1,{0,0.01,6,13,30},{5,4,3,2,1})
The rank formula needs the following variables: number, ref, and [order]
Does the ref have to be continuous?
Example: My ref is in cells A1-C1, however I have another number in another workbook that I want to add to that ref. I have a formula right now.
Here's the background:
We test for various chemicals and depending on the ppm value we take no action, note but no action, minor action, and major action.
Example:
- less than 3ppm then no action
- less than 6 but more than 3 no action but take notes
- less than 10 but more than 6 is minor action etc.
I need to know where my value lies in these tiers. The values in the tiers vary from .0001 to 100000.
Formulas are preferred, VBA will work too but no one else knows VBA so I think a formula will be easier for them and me to troubleshoot
Yes it is possible to Rank records which are not in single sheet.
Through this example I would like to show how to achieve it. Suppose you have 3 worksheet. First you need to Name them like,
={"Class1!$E$2:$E$5","Class2!$B$2:$B$5","Class3!$B$8:$B$11"}
and then after use this formula,
=IF(SUMPRODUCT(COUNTIF(INDIRECT(Score),E2))=0,"N/A",SUMPRODUCT(COUNTIF(INDIRECT(Score),">"&E2))+1).
NB : Score is the name given to the Data Ranges above.
I have a formula that builds a string with If statements, CONCATENATE, and text formulas.
My problem is that the formula's getting extremely larger than I ever wanted it.
My formula first looks to see if a cell if blank
=IF(I3="","",Else)
The Second part is to check if the letters "DKB" is in the H cell
=IF(ISNUMBER(SEARCH("*DKB*",$H3)),True,False)
The Third is if the duration (Cell F) has 0 hrs do not include (HH)
=IF(TEXT(F3,"HH")<>"00",CONCATENATE(TEXT(F3,"hh\h\r mm\m\i\n"),CONCATENATE(TEXT(F3,"mm\m\i\n"))
The Fourth one is if the are 0 min don't include min selection
=IF(TEXT(F3,"MM")<>"00",CONCATENATE(Text(F3,"HH:MM")),CONCATENATE(Text(F3,"HH"))
If I were to write all the ways this could get played out I would have a total of 10 IF's. I want a simple way to write for each option without having to write out each answer. I have a partial code but doesn't include the minute portion. Is there a better way to do this? as you can see me using only if statements I'm not an expert.
Here's a picture to demonstrate my sample data and sample output
If we could have a variable for the first part ie:10-17 to 9:10 PM
2nd variable for duration
3rd variable for DKB
Would this be possible
Perhaps something like this is what you're looking for:
=IF(I3="","",TEXT(A3,"mm-dd-yyyy")&" On-Site "&TEXT(E3,"hh:mm AM/PM")& "- "&TEXT(G3,"hh:mm AM/PM")&" "&TEXT(F3,"hh\h\r mm\m\i\n")&IF(COUNTIF(H3,"*DKB*"),MID(H3,4,20),""))
=IF(I3="","",TEXT(A3,"mm-dd-yyyy")&" On-Site "&TEXT(E3,"hh:mm AM/PM")&"- "&TEXT(G3,"hh:mm AM/PM")&" "&IF(COUNTIF(F3,"*:00:*"),TEXT(F3,"hh\h\r"),IF(COUNTIF(F3,"00:*:*"),TEXT(F3,"mm\m\i\n"),TEXT(F3,"hh\h\r mm\m\i\n"))&IF(COUNTIF(H3,"*DKB*"),MID(H3,4,20),""))))
This Will Make is so It won't show 00hr or 00min
Assuming thats the best way to go about what I want to do...
these are the 2 forumlas I want to be able to toggle between:
=150-(EDATE(F2, 37)>TODAY())*37.5-(EDATE(F2, 120)>TODAY())*37.5
=80-(EDATE(F2, 37)>TODAY())*20-(EDATE(F2, 120)>TODAY())*20
for a better idea of what I'm trying to do here's a screenshot:
is a drop down (FUll Time, Part Time) made with Data Validation.
Depending which I choose I want Cell C1 to reflect the proper forumla...
The formula by the way looks at the CellA1 and depending on how many years of service will show how many vacation days shows in cell
Aren't the two formulas doing the same thing except the part time version returns 8/15 of the value of the full time? In which case you can use just one formula and then multiply by 8/15 if G2 = "part Time", e.g.
=IF(G2="part time",8/15,1)*(150-(EDATE(F2, 37)>TODAY())*37.5-(EDATE(F2, 120)>TODAY())*37.5)
Personally though, I would use DATEDIF as I suggested in your original question here - that would be even easier to adjust:
Then that would look something like this:
=(MATCH(DATEDIF(F2,TODAY(),"y"),{0,3,10})+1)*IF(G2="part time",20,37.5)
although I notice you changed the 36 in EDATE (representing 3 years) to 37 in Jeeped's suggested formula - is that deliberate?
If the user is unable to enter anything else into B2, you can use the following formula:
=IF(B2="Full Time", *FullTimeFormula*, *PartTimeFormula*)
If the user may enter their own data, you may want to use the following formula:
=IF(B2="Full Time", *FullTimeFormula*, IF(B2="Part Time",*PartTimeFormula*,"[Error message here]"))
Final Answer:
=If(B2="Full Time",150-(EDATE(F2, 37)>TODAY())*37.5-(EDATE(F2, 120)>TODAY())*37.5,If(B2="Part Time",80-(EDATE(F2, 37)>TODAY())*20-(EDATE(F2, 120)>TODAY())*20,0),0)