LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default problem with date formula

I have been using this formula in a spreadsheet successfully for a while:
=IF(WEEKDAY(A5,1)=7,"Sa",IF(WEEKDAY(A5,1)=6,"F",IF (WEEKDAY(A5,1)=5,
_"Th",IF(WEEKDAY(A5,1)=4,"W",IF(WEEKDAY(A5,1)=3,"T u",IF(WEEKDAY(A5,1)=2, _
"M",IF(WEEKDAY(A5,1)=1,"Su","")))))))

In some circumstances, it gives a #VALUE error. So I tried to replace it
with:

=if(iserrror(IF(WEEKDAY(A5,1)=7,"Sa",IF(WEEKDAY(A5 ,1)=6,"F",IF(WEEKDAY(A5,1)=5,
_"Th",IF(WEEKDAY(A5,1)=4,"W",IF(WEEKDAY(A5,1)=3,"T u",IF(WEEKDAY(A5,1)=2,"M",
_IF(WEEKDAY(A5,1)=1,"Su","")))))))),"",IF(WEEKDAY( A5,1)=7,"Sa",IF(WEEKDAY(A5,1)=6,
_"F",IF(WEEKDAY(A5,1)=5,"Th",IF(WEEKDAY(A5,1)=4,"W ",IF(WEEKDAY(A5,1)=3,"Tu",
_IF(WEEKDAY(A5,1)=2,"M",IF(WEEKDAY(A5,1)=1,"Su","" ))))))))

I get a formula error. I use a formlaic method to do this, simply add the
IF(ISERROR(
to the beginning of the formula after I copy the original, which makes the
original formula the IF test condition, then add
),"",
and paste the original formula in, then a closing parenthesis, which puts
in the blank if the iserror is true condition and the original formula as
the false condtion. So I just blank out the error code. So why does my
method fail me here? It's highlighting the 6th occurence of "WEEKDAY" as
the probably culprit. Anyone else see what I'm missing here?

Thanks, as always.
 
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
Date / formula problem SGT Buckeye Excel Discussion (Misc queries) 1 January 19th 08 12:07 AM
Date Formula Problem - Leave date blank if Null Gayla Excel Worksheet Functions 5 April 24th 07 09:42 PM
Problem with Formula (Date) BigH Excel Discussion (Misc queries) 3 May 14th 06 10:46 PM
Date formula problem radbid via OfficeKB.com Excel Discussion (Misc queries) 4 March 30th 06 09:25 PM
Date formula problem radbid via OfficeKB.com Excel Discussion (Misc queries) 2 March 30th 06 06:43 PM


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

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

About Us

"It's about Microsoft Excel"