if function not working - crapit

06-May-07 06:24:45
Suppose that a3 is a date that has format dd/mm/yy, b3 format (dddd)

cell of B3 =A3 (B3 value = sunday)

cell of F3 =if(B3 = "sunday", "Void"), iget a 0 instead of value Sunday.
Anyting wrong>?
reply
 
 

if function not working - Dave Peterson

06-May-07 07:25:46
The underlying value in B3 is still the whole date.  You've just formatted it to
look like "Sunday".

(You could drop B3 and just check A3, too.)

=if(weekday(A3)=1,"Void","Not void")
or
=if(text(a3,"dddd")="Sunday","Void","not void")

Or you could hide that "else" portion
=if(weekday(A3)=1,"Void","")
or
=if(text(a3,"dddd")="Sunday","Void","")

Change A3 to B3 in any of those formulas if you want to keep B3 around.





--

Dave Peterson
reply
 

if function not working - BillyLidde

06-May-07 07:26:00
You do not need an if function; in B3 type =A3 and format it as ddd to
return Sun or dddd to return Sunday.

You could also use Weekday(A3) which will return 1 - to 7 unless you format
it as above.

Peter
reply
 

if function not working - Erny

06-May-07 02:21:11
Hi,

You could use in F3 the following formula:

=IF(TEXT(A3,"dddd")="Sunday","Void")

Beware that "Sunday" is written with an upper-case "S"!

Kind regards,
Erny
reply
 

if function not working - Dave Peterson

06-May-07 03:01:39
With text comparisons like this, excel doesn't care about case.

If the case is important, excel has another function =exact().




--

Dave Peterson
reply
 
I want to remove numbers but leave text in cells.
promotion
Silverlight    WPF    WCF    WWF    LINQ   
JavaScript    AJAX    ASP.NET    XAML   
C#    VB.NET    VB 6.0    GDI+    IIS    XML   
.NET Generics    Anonymous Methods    Delegate   
Visual Studio .NET    Expression Blend    Virus   
Windows Vista    Windows XP    Windows Update   
Windows 2003 Server    Windows 2008 Server   
SQL Server    Microsoft Excel    Microsoft Word   
SharePoint    BizTalk    Virtual Earth   
.NET Compact Framework    Web Service   

"Everything" RSS / ATOM Feed Parser
How to send and receive messages through message queuing in .Net
How to Read text file as database
SQL Server 2005 Paging Performance Tip
Display code of web page.
Fully Scalable Excel File Importer class for .net using Microsoft Jet driver
Generic Chart Color Manager class that can be used for any charts
Helper class to style the infragistics wingrid
Using Reflection to detemine as Assembly Info in and out.
Helper class to play with Window (Owners and position)
Resolving displayname from the culture using the XmlLanguage and LanguageSpecificStringDictionary class