Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Cindy Smith
 
Posts: n/a
Default vlookup - i think

I have the following data:

Day of Week Time Minutes Non-Work Day/Time Minutes
Tuesday 11:48 AM 3
Tuesday 11:51 AM 1
Wednesday 3:01 PM 1
Wednesday 3:02 PM 1
Wednesday 3:18 PM 1
Friday 3:37 PM 2
Friday 3:48 PM 7
Friday 3:59 PM 9
Friday 4:14 PM 2
Friday 4:17 PM 26
Sunday 7:28 PM 2
Monday 2:50 PM 1

Looking for a formula that will tell me the number of minutes called in
NON-work days or times (M-F work days, 8-5 work times).
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
rsenn
 
Posts: n/a
Default vlookup - i think


For something simple, in an new column try a formula in each row along
the line of

IF(OR(Day of Week column = "Saturday", Day of Week column = "Sunday"),
minutes column, 0)

Then sum the results.


--
rsenn
------------------------------------------------------------------------
rsenn's Profile: http://www.excelforum.com/member.php...o&userid=29050
View this thread: http://www.excelforum.com/showthread...hreadid=501257

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Roger Govier
 
Posts: n/a
Default vlookup - i think

Hi Cindy

I posted you a reply to this question which you posted in Excel.misc
yesterday.
In case you can't see it I repeat it below.
If you didn't see my post, you may not have seen the response from Bob
Philips either, to which I refer in my posting.
Bob posted
=TIME(LEFT(A6,2),MID(A6,3,2),0)+(RIGHT(A6)="P")*0. 5
I posted

Both Bob and Linc have given you solutions for the first part of your
question. My own solution was slightly different, but no better, so I
won't confuse you by adding it to those already received.

However, there was a corollary to your question about how to calculate
the number of minutes which were outside of normal work hours.
With Day in column A, Time in B and Minutes in C I put my formula to
convert the text of time to real time in column F (you will need to
change the references in the formulae you have to be column B, instead
of columnA).
Then in column G enter

=IF(LEFT(A1)="S",C1,IF(F1+TIME(0,C1,0)TIME(17,30, 0),
(F1+TIME(0,C1,0)-TIME(17,30,0))*1440,IF(F1<TIME(8,0,0),
(F1+TIME(0,C1,0)-TIME(8,0,0))*1440,0)))
Format the cell as General and copy down the column.

This does literally what you asked for and would give results of
0,0,0,5,2,4 for the 6 lines of example data you posted
The first 3 lines would all be 0 because the calls originate within the
working week.
Lines 4 and 5 take the total minutes, as they both originate on a
weekend.
Line 6 call starts during the working week, but ends 4 minutes outside
the working week, so 4 of the total 10 minutes would be returned.

If your request for time is more simply only those that began outside
the working week, regardless of whether their durations took them to
within the working week, the above formula could be simplified, but I
would be inclined to make it easier by converting all time to decimal
hours. This could be achieved by multiplying the formulae you already
have by 24. For example, with Bob's formula, (adjusted for column B), it
would be in column F
=(TIME(LEFT(B10,2),MID(B10,3,2),0)+(RIGHT(B10)="P" )*0.5)*24
and the simplified formula would be
=IF(LEFT(A1)="s",C1,IF(I1<8,C1,IF(I117.5,C1,0)))
which would return results of 0,0,0,5,2,0

I hope this helps.


--
Regards

Roger Govier


"Cindy Smith" wrote in message
...
I have the following data:

Day of Week Time Minutes Non-Work Day/Time Minutes
Tuesday 11:48 AM 3
Tuesday 11:51 AM 1
Wednesday 3:01 PM 1
Wednesday 3:02 PM 1
Wednesday 3:18 PM 1
Friday 3:37 PM 2
Friday 3:48 PM 7
Friday 3:59 PM 9
Friday 4:14 PM 2
Friday 4:17 PM 26
Sunday 7:28 PM 2
Monday 2:50 PM 1

Looking for a formula that will tell me the number of minutes called
in
NON-work days or times (M-F work days, 8-5 work times).



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using single cell reference as table array argument in Vlookup CornNiblet Excel Worksheet Functions 3 September 22nd 05 09:15 AM
VLOOKUP Limitations chris_manning Excel Worksheet Functions 2 August 9th 05 06:23 PM
Have Vlookup return a Value of 0 instead of #N/A Mr Mike Excel Worksheet Functions 4 May 25th 05 04:51 PM
vlookup data hidden within worksheet Excel Worksheet Functions 0 January 26th 05 12:09 PM
Vlookup info being used without vlookup table attached? Excel Worksheet Functions 0 January 25th 05 10:43 AM


All times are GMT +1. The time now is 12:51 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"