Can anybody help with my formula please???

Fox123

Board Regular
Joined
Sep 15, 2009
Messages
65
Hi,

I have a column with a list of time periods in a format like this :
<TABLE style="WIDTH: 71pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=95 border=0 x:str><COLGROUP><COL style="WIDTH: 71pt; mso-width-source: userset; mso-width-alt: 3474" width=95><TBODY><TR style="HEIGHT: 12.75pt; mso-height-source: userset" height=17><TD class=xl25 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; WIDTH: 71pt; BORDER-BOTTOM: #ece9d8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" width=95 height=17 x:num="1.9444444444444375E-2">00:28:00</TD></TR><TR style="HEIGHT: 12.75pt; mso-height-source: userset" height=17><TD class=xl25 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=17 x:num="1.7361111111111112E-2">00:25:00</TD></TR><TR style="HEIGHT: 12.75pt; mso-height-source: userset" height=17><TD class=xl25 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=17 x:num="2.2222222222222254E-2">00:32:00</TD></TR><TR style="HEIGHT: 12.75pt; mso-height-source: userset" height=17><TD class=xl25 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=17 x:num="7.1527777777777857E-2">01:43:00</TD></TR><TR style="HEIGHT: 12.75pt; mso-height-source: userset" height=17><TD class=xl25 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=17 x:num="6.9444444444444198E-4">00:01:00</TD></TR><TR style="HEIGHT: 12.75pt; mso-height-source: userset" height=17><TD class=xl25 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=17 x:num="6.2499999999999778E-3">00:09:00</TD></TR><TR style="HEIGHT: 12.75pt; mso-height-source: userset" height=17><TD class=xl25 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=17 x:num="6.9444444444444198E-4">00:01:00</TD></TR><TR style="HEIGHT: 12.75pt; mso-height-source: userset" height=17><TD class=xl25 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=17 x:num="1.5972222222222276E-2">00:23:00</TD></TR></TBODY></TABLE>
I need a formula that will categorise the data in the column like this :

1. If the cell value (let's assume this is cell A1) is between 00:00 and 00:14 I want Excel to return "0 to 14 Minutes".
2. If the cell value is between 00:15 and 00:29 I want Excel to return "15 to 29 Minutes".
3. If the cell value is between 00:30 and 00:44 I want Excel to return "30 to 44 Minutes.
4. If the cell value is between 00:45 and 00:59 I want Excel to return "45 to 59 Minutes"
5. If the cell value is 00:60 or greater I want Excel to return "Over 60 Minutes"

This is probably really simple but I can't get my formulas to work.

Thanks guys. :confused:

Fox123
 

Some videos you may like

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092
If your data starts in A1, in B1 enter:

=IF(HOUR(A1)>0,"Over 60 minutes",LOOKUP(MINUTE(A1),{0,15,30,45},{"0 to 14 minutes","15 to 29 minutes","30 to 44 minutes","45 to 59 minutes"}))

and copy down.
 

schielrn

Well-known Member
Joined
Apr 4, 2007
Messages
6,934
How about this:
Excel Workbook
AB
10:28:0015 to 29 Minutes
20:25:0015 to 29 Minutes
30:32:0030 to 44 Minutes
41:43:00Over 60 Minutes
50:01:000 to 14 Minutes
60:09:000 to 14 Minutes
70:01:000 to 14 Minutes
80:23:0015 to 29 Minutes
Sheet1
Cell Formulas
RangeFormula
B1=IF(A1<=TIMEVALUE("00:14:00"),"0 to 14 Minutes",IF(A1<=TIMEVALUE("00:29:00"),"15 to 29 Minutes",IF(A1<=TIMEVALUE("00:44:00"),"30 to 44 Minutes",IF(A1"00:59:00"),"45 to 59 Minutes","Over 60 Minutes"))))

Hope that helps.
 

Fox123

Board Regular
Joined
Sep 15, 2009
Messages
65
Hi both,

Thank you for your help. The problem is now sorted.

mrexcel.com rules!!!

Fox123
 

Subscribe on YouTube

Watch MrExcel Video

Forum statistics

Threads
1,106,386
Messages
5,511,002
Members
408,823
Latest member
TJKnight

This Week's Hot Topics

  • Turn fraction around
    Hello I need to turn a fraction around, for example I have 1/3 but I need to present as 3/1
  • TIme Clock record reformatting to ???
    Hello All, I'd like some help formatting this (Tbl-A)(Loaded via Power Query) [ATTACH type="full" width="511px" alt="PQdata.png"]22252[/ATTACH]...
  • TextBox Match
    hi, I am having a few issues with my code below, what I need it to do is when they enter a value in textbox8 (QTY) either 1,2 or 3 the 3 textboxes...
  • Using Large function based on Multiple Criteria
    Hello, I can't seem to get a Large formula to work based on two criteria's. I can easily get a oldest value based one value, but I'm struggling...
  • Can you check my code please
    Hi, Im going round in circles with a Compil Error End With Without With Here is the code [CODE=rich] Private Sub...
  • Combining 2 pivot tables into 1 chart
    Hello everyone, My question sounds simple but I do not know the answer. I have 2 pivot tables and 2 charts that go with this. However I want to...
Top