#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default if statment

I have a cell (b1) formatted as ddd, d-mmm-yy and I need cell (a1) to show
"weekend" if the cell (b1) is a "Sat" or "Sun". What is the proper syntax for
this "IF" statement or is there a better way to accomplish this issue?

TIA
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default if statment


Try:

=IF(LEFT(TEXT(B1,"ddd"))="S","WeekEnd","WeekDay")


--
NBVC

Where there is a will there are many ways.
'The Code Cage' (http;//www.thecodecage.com)
------------------------------------------------------------------------
NBVC's Profile: http://www.thecodecage.com/forumz/member.php?userid=74
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=109802

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 236
Default if statment

=IF(MOD(B2,7)<=1,"Weekend","")
--
Hope this helps.
If it does, please click the Yes button.
Thanks in advance for your feedback.
Gary Brown



"Stuntz Waldorf" wrote:

I have a cell (b1) formatted as ddd, d-mmm-yy and I need cell (a1) to show
"weekend" if the cell (b1) is a "Sat" or "Sun". What is the proper syntax for
this "IF" statement or is there a better way to accomplish this issue?

TIA

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default if statment

Works like a charm. Thank You for you immediate reply!!!!!!!!!!

"NBVC" wrote:


Try:

=IF(LEFT(TEXT(B1,"ddd"))="S","WeekEnd","WeekDay")


--
NBVC

Where there is a will there are many ways.
'The Code Cage' (http;//www.thecodecage.com)
------------------------------------------------------------------------
NBVC's Profile: http://www.thecodecage.com/forumz/member.php?userid=74
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=109802


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,104
Default if statment

Alternative solution
=IF(=WEEKDAY(B1,2)5,"Weekend","Weekday")
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"Stuntz Waldorf" <Stuntz wrote in message
...
I have a cell (b1) formatted as ddd, d-mmm-yy and I need cell (a1) to show
"weekend" if the cell (b1) is a "Sat" or "Sun". What is the proper syntax
for
this "IF" statement or is there a better way to accomplish this issue?

TIA



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
If statment help Joe Wildman[_2_] Excel Worksheet Functions 3 February 16th 09 08:16 PM
IF Statment Momo Excel Worksheet Functions 2 December 6th 08 03:24 PM
Help with If statment pm Excel Discussion (Misc queries) 3 January 29th 08 05:09 PM
If statment Jason Excel Discussion (Misc queries) 3 January 4th 08 12:39 AM
If statment if its possible. atb Excel Discussion (Misc queries) 2 October 17th 06 05:50 PM


All times are GMT +1. The time now is 10:44 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"