A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

if statment



 
 
Thread Tools Display Modes
  #1  
Old June 24th, 2009, 06:37 PM posted to microsoft.public.excel.worksheet.functions
Stuntz Waldorf
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  
Old June 24th, 2009, 06:40 PM posted to microsoft.public.excel.worksheet.functions
NBVC[_34_]
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  
Old June 24th, 2009, 06:47 PM posted to microsoft.public.excel.worksheet.functions
Gary Brown[_5_]
external usenet poster
 
Posts: 87
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  
Old June 24th, 2009, 06:49 PM posted to microsoft.public.excel.worksheet.functions
Stuntz Waldorf[_2_]
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  
Old June 24th, 2009, 08:07 PM posted to microsoft.public.excel.worksheet.functions
Bernard Liengme[_2_]
external usenet poster
 
Posts: 1,027
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



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


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


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