Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Literal based on Week end

I tried these to NO avail:
Cell D51 contains a formula - =TEXT(B51,"dddd")

For Cell E51 I want to enter an IF condition based upon the Weekday value in
Cell D51.

So, here is what I have tried and I also have tried some other variations:

1. IF(D51="Sunday" OR D51= "Saturday","No Hours Recorded","Charged")

2. IF(D51='Sunday' OR D51= 'Saturday','No Hours Recorded','Charged')

All failed, could anyone pinpoint and corrected the typo?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Literal based on Week end

The syntax of the OR function is OR(condition1,condition2)
--
David Biddulph

"Umar" wrote in message
...
I tried these to NO avail:
Cell D51 contains a formula - =TEXT(B51,"dddd")

For Cell E51 I want to enter an IF condition based upon the Weekday value
in
Cell D51.

So, here is what I have tried and I also have tried some other variations:

1. IF(D51="Sunday" OR D51= "Saturday","No Hours Recorded","Charged")

2. IF(D51='Sunday' OR D51= 'Saturday','No Hours Recorded','Charged')

All failed, could anyone pinpoint and corrected the typo?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Literal based on Week end


"Umar" wrote in message
...
I tried these to NO avail:
Cell D51 contains a formula - =TEXT(B51,"dddd")

For Cell E51 I want to enter an IF condition based upon the Weekday value
in
Cell D51.

So, here is what I have tried and I also have tried some other variations:

1. IF(D51="Sunday" OR D51= "Saturday","No Hours Recorded","Charged")

2. IF(D51='Sunday' OR D51= 'Saturday','No Hours Recorded','Charged')

All failed, could anyone pinpoint and corrected the typo?


The syntax for OR is not correct. Try this:

=IF( OR ( D51="Sunday", D51 = "Saturday"), "No Hours Recorded", "Charged" )

Hope this helps / Lars-Ã…ke


--- news://freenews.netfront.net/ - complaints: ---
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 506
Default Literal based on Week end

=IF(OR(D51="Sunday",D51="Saturday"),"No Hours Recorded","Charged")

Remember to Click Yes, if this post helps!

--------------------
(Ms-Exl-Learner)
--------------------


"Umar" wrote:

I tried these to NO avail:
Cell D51 contains a formula - =TEXT(B51,"dddd")

For Cell E51 I want to enter an IF condition based upon the Weekday value in
Cell D51.

So, here is what I have tried and I also have tried some other variations:

1. IF(D51="Sunday" OR D51= "Saturday","No Hours Recorded","Charged")

2. IF(D51='Sunday' OR D51= 'Saturday','No Hours Recorded','Charged')

All failed, could anyone pinpoint and corrected the typo?

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,934
Default Literal based on Week end

As others have told you, your syntax for the OR was incorrect (it is a
function, not an operator); however, for your particular formula, you don't
need to use OR at all; here is an alternative...

=IF(WEEKDAY(B51,2)5,"No Hours Recorded","Charged")

Note the argument for the WEEKDAY function is B51... your actual date, not
D51 which only contains the text for the day of the week... and that the 2
tells the WEEKDAY function to count the days of the week starting with
Monday; hence, Saturday would be day number 6 and Sunday would be day number
7, which is why the test I use is 5 (you could use =6 if you wanted to)

--
Rick (MVP - Excel)


"Umar" wrote in message
...
I tried these to NO avail:
Cell D51 contains a formula - =TEXT(B51,"dddd")

For Cell E51 I want to enter an IF condition based upon the Weekday value
in
Cell D51.

So, here is what I have tried and I also have tried some other variations:

1. IF(D51="Sunday" OR D51= "Saturday","No Hours Recorded","Charged")

2. IF(D51='Sunday' OR D51= 'Saturday','No Hours Recorded','Charged')

All failed, could anyone pinpoint and corrected the typo?




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Literal based on Week end

Cell D51 contains a formula - =TEXT(B51,"dddd")

Another one...

=IF(LEFT(D51)="S","No Hours Recorded","Charged")

--
Biff
Microsoft Excel MVP


"Umar" wrote in message
...
I tried these to NO avail:
Cell D51 contains a formula - =TEXT(B51,"dddd")

For Cell E51 I want to enter an IF condition based upon the Weekday value
in
Cell D51.

So, here is what I have tried and I also have tried some other variations:

1. IF(D51="Sunday" OR D51= "Saturday","No Hours Recorded","Charged")

2. IF(D51='Sunday' OR D51= 'Saturday','No Hours Recorded','Charged')

All failed, could anyone pinpoint and corrected the typo?



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
Number to words literal JCP Excel Worksheet Functions 12 August 22nd 08 05:18 PM
Return dates based on month and day of week lesg46 Excel Worksheet Functions 8 January 4th 07 12:47 AM
How to use literal quotes with concatenation schieb Excel Discussion (Misc queries) 2 February 3rd 06 09:49 PM
52 week average based on date tomandrobyn Excel Discussion (Misc queries) 5 June 3rd 05 07:34 PM
Referencing Literal Arrays Vic Sowers Excel Worksheet Functions 2 May 24th 05 12:50 AM


All times are GMT +1. The time now is 05:17 AM.

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"