ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   if statment (https://www.excelbanter.com/excel-worksheet-functions/234901-if-statment.html)

Stuntz Waldorf

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

NBVC[_34_]

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


Gary Brown[_5_]

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


Stuntz Waldorf[_2_]

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



Bernard Liengme[_3_]

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





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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com