Home > OS >  Assigning a "type" to a data point based on a criteria on excel
Assigning a "type" to a data point based on a criteria on excel

Time:12-04

I am trying to assign a rate type based on the hour of the day. I would be really appreciative if someone could help me with a formula that takes the hour from column B and checks it against the following criteria: if the hour is between 10PM and 6AM (including) then the rate is night time, else the rate is day time.

Image of table I'm working with.

CodePudding user response:

Use Choose and MATCH:

=CHOOSE(MATCH(B2,{0,.25,.91665}),"Night Time","Day Time","Night Time")

enter image description here

  • Related