Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 12
Default If statements query

Hi I am trying to create a time sheet.

Where column A is the date (ddd, dd,mmm,yyyy) in column B I would like it to
enter the time 9:15 (hh:mm) if the day is Monday, Tuesday, Wednesday or
Thursday and then enter 0:00 if it is Friday, Saturday or Sunday.

Is this at all possible? If so how would I go about working this out?

Any help appreciated.

Many thanks

JayM
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 99
Default If statements query

Hi Jay,

Try the following formula and drag down.

=IF(OR(WEEKDAY(A1,2)=1,WEEKDAY(A1,2)=2,WEEKDAY(A1, 2)=3,WEEKDAY(A1,2)=4),TIMEVALUE("09:15"),TIMEVALUE ("00:00"))

and give the resulting cells a custom format of hh:mm

Dave

"JayM" wrote:

Hi I am trying to create a time sheet.

Where column A is the date (ddd, dd,mmm,yyyy) in column B I would like it to
enter the time 9:15 (hh:mm) if the day is Monday, Tuesday, Wednesday or
Thursday and then enter 0:00 if it is Friday, Saturday or Sunday.

Is this at all possible? If so how would I go about working this out?

Any help appreciated.

Many thanks

JayM

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 12
Default If statements query

Thank you so much that works perfectly.

JayM

"Dave Curtis" wrote:

Hi Jay,

Try the following formula and drag down.

=IF(OR(WEEKDAY(A1,2)=1,WEEKDAY(A1,2)=2,WEEKDAY(A1, 2)=3,WEEKDAY(A1,2)=4),TIMEVALUE("09:15"),TIMEVALUE ("00:00"))

and give the resulting cells a custom format of hh:mm

Dave

"JayM" wrote:

Hi I am trying to create a time sheet.

Where column A is the date (ddd, dd,mmm,yyyy) in column B I would like it to
enter the time 9:15 (hh:mm) if the day is Monday, Tuesday, Wednesday or
Thursday and then enter 0:00 if it is Friday, Saturday or Sunday.

Is this at all possible? If so how would I go about working this out?

Any help appreciated.

Many thanks

JayM

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 857
Default If statements query

Hi,

Here is a shorter approach:

=--IF(MOD(A1-2,7)3,"0:00","9:15")

then format the cells as time.

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"JayM" wrote:

Hi I am trying to create a time sheet.

Where column A is the date (ddd, dd,mmm,yyyy) in column B I would like it to
enter the time 9:15 (hh:mm) if the day is Monday, Tuesday, Wednesday or
Thursday and then enter 0:00 if it is Friday, Saturday or Sunday.

Is this at all possible? If so how would I go about working this out?

Any help appreciated.

Many thanks

JayM

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default If statements query

Even shorter...

=(WEEKDAY(A1,2)<5)*"9:15"


"Shane Devenshire" wrote:

Hi,

Here is a shorter approach:

=--IF(MOD(A1-2,7)3,"0:00","9:15")

then format the cells as time.

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"JayM" wrote:

Hi I am trying to create a time sheet.

Where column A is the date (ddd, dd,mmm,yyyy) in column B I would like it to
enter the time 9:15 (hh:mm) if the day is Monday, Tuesday, Wednesday or
Thursday and then enter 0:00 if it is Friday, Saturday or Sunday.

Is this at all possible? If so how would I go about working this out?

Any help appreciated.

Many thanks

JayM

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
Excel 2007 / MS Query - editing existing query to another sheet Hotpepperz Excel Discussion (Misc queries) 0 June 13th 08 06:53 PM
Calculated field using IF statements in the Query Grid Peter New Users to Excel 2 December 29th 07 12:35 PM
Conditional statements in MS-Query? Jim Moberg Excel Discussion (Misc queries) 0 October 5th 06 07:27 PM
Excel MS Query multiple select statements Revenger Excel Discussion (Misc queries) 3 May 12th 06 12:32 PM
Use SQL statements in Excel VBA to query SQL Server Data Problem Thank You Excel Worksheet Functions 0 November 20th 04 12:45 PM


All times are GMT +1. The time now is 10:11 PM.

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

About Us

"It's about Microsoft Excel"