Closed
thepishoner - Aug 6, 2016 at 04:03 AM
fdibbins Posts 33 Registration date Sunday June 19, 2016 Status Contributor Last seen November 20, 2016 - Aug 8, 2016 at 11:51 PM
Hello,

Can you help me with this data. What formula can I use?

If 18:00 to 18:59 = 1
If 19:00 to 19:59 = 2
If 19:00 to 19:59 = 3
If 20:00 to 20:59 = 4

2 responses

Mazzaropi Posts 1985 Registration date Monday August 16, 2010 Status Contributor Last seen May 24, 2023 147
Aug 6, 2016 at 08:38 AM
thepishoner, Good morning.

Using Excel you have always a lot of options to solve a question.

In your case you can use an IF function or a VLOOKUP function as my suggestion.

I did a little example for you.
Take a look at it:
http://speedy.sh/E4jEw/06-08-2016-en-Kioskea-Time-Table-Control-OK.xlsx

Please, tell us if it worked for you.
I hope it helps.
--
Belo Horizonte, Brasil.
Marcílio Lobão
fdibbins Posts 33 Registration date Sunday June 19, 2016 Status Contributor Last seen November 20, 2016 1
Aug 6, 2016 at 07:35 PM
Another way...
=if(a1<21/24,4,if(a1<20/24,3,if(a1<19/24,2,if(a1>18/24,1,"")))

If 18:00 to 18:59 = 1
If 19:00 to 19:59 = 2
If 19:00 to 19:59 = 3
If 20:00 to 20:59 = 4
Blocked Profile
Aug 8, 2016 at 05:08 PM
NIce solution for script kiddies! Try to explain the NESTED IF's as so the person asking the questions ACTUALLY LEARNS something, and doesn't just respond with "it still doesn't work!", as they have cut and pasted your solution, but they fail to explain the whole scope!

Just sayin!

Have FUN!

By the way, welcome to the NEWBIE EXCEL site!
fdibbins Posts 33 Registration date Sunday June 19, 2016 Status Contributor Last seen November 20, 2016 1
Aug 8, 2016 at 11:51 PM
Script kiddies? Really??

While your message is valid, the delivery needs a LOT of work. This is the 2nd time in a week that I have experienced mods here needing a tone adjustment. I was invited here by 1 of your members, and I would suggest that if you want the site to grow, you learn a little respect for the members here