Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Date Question!

Posted on 2011-09-07
6
Medium Priority
?
173 Views
Last Modified: 2012-05-12
I have this formula in a cell:
=IF(BN2="","","Qtr"&LOOKUP(MONTH(BN2),{1,4,7,10;2,3,4,1})&", "&YEAR(BN2+92)&", Week "&INT((BN2-DATE(YEAR(BN2+92)-1,10,1)-WEEKDAY(BN2-1))/7)+2)

It returns the following result (depending on the date): Qtr4, 2011, Week 48.

  I would actually like a new formula which returns only the date for Monday of each new week: For example: "Week of September 5, 2011". This would encompass all of the days of that week, until the following Monday, so it would still read the same even if the dates were September 6, September 7, September 8, September 9, Septembe 10 or September 11. The formula would change again on Monday September 12, etc.......
0
Comment
Question by:angelfromabove
[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
  • 3
  • 2
6 Comments
 
LVL 50

Expert Comment

by:barry houdini
ID: 36497814
If the date is still in BN2 try this formula

="Week of "&TEXT(BN2-WEEKDAY(BN2,3),"mmmm d, yyyy")

regards, barry
0
 
LVL 50

Accepted Solution

by:
barry houdini earned 2000 total points
ID: 36497844
....and your current formula returns a blank if BN2 is blank so to include that too, just add an IF function, i.e.

=IF(BN2="","","Week of "&TEXT(BN2-WEEKDAY(BN2,3),"mmmm d, yyyy"))

barry
0
 
LVL 60

Expert Comment

by:HainKurt
ID: 36497898
here it is:

A1: 07/09/2011
A2: =MondayOfDate(A1)

make sure A2 is formatted as date
Function MondayOfDate(dt)
  MondayOfDate = DateAdd("d", -DatePart("w", dt) + 1, dt)
End Function

Open in new window

0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 60

Expert Comment

by:HainKurt
ID: 36497915
oops, I guess we neeed to add 2 :)
Function MondayOfDate(dt)
  MondayOfDate = DateAdd("d", -DatePart("w", dt) + 1, dt)
End Function

Open in new window

0
 
LVL 60

Expert Comment

by:HainKurt
ID: 36497920
sorry :) last post

A1: 07/09/2011
A2: =MondayOfDate(A1)

make sure A2 is formatted as date
Function MondayOfDate(dt)
  MondayOfDate = DateAdd("d", -DatePart("w", dt) + 2, dt)
End Function

Open in new window

0
 

Author Comment

by:angelfromabove
ID: 36497998
I will accept Barry's solution as the best, becaust it worked perfectly. Thanks to everyone else, however.  Barry, I still have an open question with you a week or two back, regarding past due date ranges; Can you please respond to that when you have a chance also?  Thanks so very much again!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
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…

609 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