Function with mutltiple value statements

mikey090tx

New Member
Joined
Jul 7, 2011
Messages
2
Hello All-

I am wondering if anyone would be able to assist with the following scenario. I am working on a project that involves adding variable data into cells that is then "graded" and given a point value. The data is as follows


Let's say cells A1-A20 contain the variable data and that the data can range from 2:55 to 3:25 (time). Cell B2-B20 would return a "score / grade" if the data in cell A1 was between the following criteria

2:55 – 3:05= 3 score
3:06-3:15= 2 score
3:16-3:25= 1 score

I have only been able to come up with this function and can only return 1 value and cannot place a difference or return the accurate variable if the time doesnt fall between the time that i use in the fuction. i tried to add more fuctions in different cells but get mutiple returns on the same time in A1. I hope this make sense. In the example below, if i entered 3:00 in cell A1 and used a fuction for every one of the three score categories i would end up with a 3 and a 2 and a 1 and i only want the formula to return one value for which the time actually fall between.

=IF(A1="","0",IF(A1<3:16,2,0))
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Perhaps this:

=LOOKUP(B6,{0,0.1215,0.129,0.136,0.143},{"Error",3,2,1,"Error"})
 
Last edited:
Upvote 0
Hello All-

I am wondering if anyone would be able to assist with the following scenario. I am working on a project that involves adding variable data into cells that is then "graded" and given a point value. The data is as follows


Let's say cells A1-A20 contain the variable data and that the data can range from 2:55 to 3:25 (time). Cell B2-B20 would return a "score / grade" if the data in cell A1 was between the following criteria

2:55 – 3:05= 3 score
3:06-3:15= 2 score
3:16-3:25= 1 score

I have only been able to come up with this function and can only return 1 value and cannot place a difference or return the accurate variable if the time doesnt fall between the time that i use in the fuction. i tried to add more fuctions in different cells but get mutiple returns on the same time in A1. I hope this make sense. In the example below, if i entered 3:00 in cell A1 and used a fuction for every one of the three score categories i would end up with a 3 and a 2 and a 1 and i only want the formula to return one value for which the time actually fall between.

=IF(A1="","0",IF(A1<3:16,2,0))
Here's one way...

Book1
AB
13:102
23:251
32:593
43:062
53:211
63:201
72:553
82:573
93:161
103:221
Sheet1

Formula entered in B1 and copied down:

=IF(A1>=TIME(3,16,0),1,IF(A1>=TIME(3,6,0),2,3))
 
Upvote 0
Biff-

Thanks for the reply, the formula works great. One small question, where would i add the " ", 0 to add a 0 value if i have an empty cell as it scores at a 3 since the it is blank and would considered to be less than 3:05?
 
Upvote 0
Biff-

Thanks for the reply, the formula works great. One small question, where would i add the " ", 0 to add a 0 value if i have an empty cell as it scores at a 3 since the it is blank and would considered to be less than 3:05?
Try this...

=IF(A1="",0,IF(A1>=TIME(3,16,0),1,IF(A1>=TIME(3,6,0),2,3)))
 
Upvote 0

Forum statistics

Threads
1,224,505
Messages
6,179,147
Members
452,891
Latest member
JUSTOUTOFMYREACH

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top