Solved

another Excel formula

Posted on 2014-11-20
4
76 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
[X]
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
  • 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

726 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