Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

another Excel formula

Posted on 2014-11-20
4
73 Views
Last Modified: 2014-11-20
Can an Expert help me out with this please.

I need to say

IF E2 Contain either Sat or Sun, return 2 if it does not contain either return 1

thanks
0
Comment
Question by:Jagwarman
  • 2
4 Comments
 
LVL 24

Accepted Solution

by:
Phillip Burton earned 500 total points
ID: 40454791
If E2 is text, then

=IF(AND(ISERROR(SEARCH("SAT",E2)),ISERROR(SEARCH("SUN",E2))),1,2)
0
 
LVL 24

Expert Comment

by:Phillip Burton
ID: 40454793
If E2 is a date, then

=IF(OR(WEEKDAY(E2)=7,WEEKDAY(E2)=1),2,1)
0
 
LVL 50

Expert Comment

by:Rgonzo1971
ID: 40454799
Hi,

Shorter

=IF(MOD(E2,7)<2,2,1)

Regards
0
 

Author Comment

by:Jagwarman
ID: 40454803
Brilliant thanks Phillip
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

791 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question