Finding The Date Of Previous Monday Of Certain Date..
May 4, 2009
I need a VBA code which tells me the date of previous monday of any date. The user types in any date to the cell A1, and I need the date of previous monday to be inserted to the cell A2.
For example:
A1: 9/5/2009 --> A2: 4/5/2009
A1: 19/5/2009 --> A2: 18/5/2009
A1: 27/12/2009 --> A2: 21/12/2009
View 4 Replies
ADVERTISEMENT
Sep 23, 2007
I am currently using this formula =DATE(YEAR(A1),MONTH(A1)+6,DAY(A1)) to get me 6 months ahead from a certain date. There is a new problem that has arose for me. I need a formula that will give me 6 months from a certain date if it falls on a Monday if the 6 months does not fall on a Monday then give me the next Monday date.
for example 6 months from 1/2/2007 is 7/2/2007 which falls on a Monday which is fine but, If the start date was 1/3/2007 this falls on a Tuesday so I would need the next Monday date 7/9/2007.
View 9 Replies
View Related
Aug 24, 2014
I have a list of dates and I need a formula that will return the date of the following Monday, IF the date falls on a Friday, Saturday or Sunday.
View 3 Replies
View Related
Apr 16, 2014
I have a formula
=AL260-WEEKDAY(AL260,2)+MATCH(AP260,{"Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"},0)
The formula looks at the chosen start date (AL260), and then uses a displayed text day (AP20) to display the relvent date to the text day, this works fine however if the start date is say 08/08/14 (a Friday) when the formula detects a Monday (this copies down a range looking at the start date and the text days to produce dates on each line, the formula displays the Monday dates prior to start date, is there any way to alter this to make it display the dates ahead of the chosen start date?
View 10 Replies
View Related
Mar 14, 2014
I have an excel sheet wherin there is a column that has the data where in the dates are displayed and many other columns.
I get this excel every Thursday so i want to filter this date column in such a way that it give me the data related to the date of the previous week only yet there is a catch here. When i say previous week i mean.
Suppose today is 03/14/14 then i want the data from 03/07/14 till today ie Last week friday to this week full( so cant use Current week option) and then paste it in a new sheet.
I tried the Record part but in that it is taking a hard coded value as i am selecting the date myself. I dont want to change the date manually every time.
this was the macro that was created
Code:
ActiveSheet.Range("$A$1:$BX$58").AutoFilter Field:=1, Operator:= _
xlFilterValues, Criteria2:=Array(1, "3/10/2014")
Range("A59").Select
ActiveCell.FormulaR1C1 = "=COUNT(R[-4]C:R[-1]C)"
Range("A60").Select
View 8 Replies
View Related
Jul 29, 2008
The clue's in the title. I have a date in cell (BC25). I need to jump forward by one year then if the date doesn't fall on a Monday I need to find the next Monday.
I've looked at this thread which should point the way but I'm particularly dim this morning and can't get it to work.
http://www.mrexcel.com/forum/showthr...ghlight=monday
View 9 Replies
View Related
Oct 25, 2006
I have a spreadsheet which I use to track when a work request is recieved, when we confirm the request and when we action the request. I have been trying to write some code to count the amount of requests, receipts and actions we have processed in the last month.
My first column shows who the request is from
The second shows date recieved
The third shows date we send receipt
The fourth shows the date actioned.
View 9 Replies
View Related
Jan 16, 2007
Is it possible to to return a date that begins on following mondayand adds days unless it was entered on a monday then just add 17 days
if someone enters a date say 10/01/07 (wednesday) i need to be able get the following mondays date and add 10 days to it IE 25/01/07
View 14 Replies
View Related
Apr 24, 2006
to determine the number of 1st Mondays or any weeday e.g. 5th Fridays between a date range e.g. 1/1/2006 - 4/1/2006.
I've noticed a lot of threads for calculating just one month but none for a period of time.
View 14 Replies
View Related
Feb 2, 2004
This formula on the forum has helped me to find the first day I specify of the month of a certain year. (here a monday in august of the year specified in B1)
=DATE(B1;8;8-WEEKDAY(DATE(B1;8;1);3)-IF(WEEKDAY(DATE(B1;8;1);3)=0;7;0))
As I'm not really good at understanding the formula (I get confused with the =0;7;0 bit), even though I can make it work I'd like to know how I can find the a last specific day (mo-su) in a month.
View 9 Replies
View Related
Sep 20, 2006
I want to be able to test if a date entered in a cell (Format dd/mm/yyyy) equals a "Monday". If it doesn't, I want to display a warning message.
View 6 Replies
View Related
Dec 12, 2013
I'm sent a file every day where column A contains a month & year but in "general" format.
For example;
Column A, starting with cell A1 with the next date in A2, etc
Jan15
Feb15
Mar15
Apr15
Is there a way through a formula or macro that I can use in order to run through all the dates in this column to make sure that the next cell down is always the month after the cell above it? The dates go all the way through to 2018 in the above format.
View 3 Replies
View Related
Nov 23, 2009
I'm trying to find the calculation which will automatically have the date for the first Monday in January to show
e.g. Cell A1 input 2010 Cell A2 would show 04/01/2010
Cell A1 input 2011 Cell A2 would show 03/01/2011
etc
View 3 Replies
View Related
Mar 17, 2013
The portfolio team uses data that is refreshed every Monday. Write a formula to obtain the current week's Monday's date.
View 3 Replies
View Related
May 9, 2013
I have a column with a few dates.
I need a formula to display the previous date to the most current date out of the list.
How do I do that?
View 5 Replies
View Related
Jun 23, 2006
I am writing a module which have a different test based on for each of the previous 2 column cells. It calculate the days passed or in simple way calculate the date difference for the 2 columns and puts them in third. But i need to use a inputbox for entering the first date for monday of the month each time i use the worksheet.
When i try using the module for each cell of the column it display the input box for each cell. is there any way so that i just enter the value in input box and it can be used in rest of the module.Without using it again and again.
View 8 Replies
View Related
Jun 30, 2014
Find the weekend date of each dates.
I am generating a report , for which i need to find the weekend date of the corresponding date.
Following is the code that I am using to generate the dates. Need to generate the corresponding weekend date as well.
Also attached is the output file I am looking for.
Attached File: IQN- Apr 2014 - Souvik Ghosh.xlsx‎
View 6 Replies
View Related
Dec 3, 2009
I have dates (12/3/09) in columns A, G, K and P.
There may or may not be a date in any of these cells.
How do I find the very last date in the worksheet.
I want to do this with code.
View 9 Replies
View Related
Apr 21, 2014
In Excel VBA, is there a way to get the beginning date and the last date for the previous month from TODAY()?
i.e. If TODAY is Jan 3, 2014, then I would like to have the beginning date as Dec 1, 2013 and the end date as Dec 31, 2013.
i.e. If TODAY is Mar 18, 2012, then I would like to have the beginning date as Feb 1, 2012 and the end date as Feb 29, 2012 (yes 29, not 28).
So basically, I need to have the AI to know the beginning of the year (January 2014 - takes Dec 2013) and if it happens to be February, the 'end date' is either 28th or 29th depending on the year.
View 7 Replies
View Related
Jan 4, 2010
I have a folder containing excel files with dynamic suffix names. I have files for all days starting from the 1st of the month – for example : Performance_01012010.xls, Performance 02012010.xls, Performance_03012010.xls till Performance_31012010.xls.
I want a VBA code to retrieve the date out and change it automatically (means it should add 1 automatically to the previous date). For example, if I open Performance_05012010.xls, my macro should SAVE AS this file to Performance_06012010.xls.
View 9 Replies
View Related
Aug 15, 2014
I have a date that has to be amended every now and then because the date is changing (bcoz of Night Shift), hence, I need to know a formula that.
IF Time is within 8:00 PM (Aug 15) until 5:00 AM (Aug 16), the Aug 15 will prevail.
View 3 Replies
View Related
Dec 14, 2007
Is there a way to make the date in a cell check the current date then fall back to the previous sunday unless today actually happens to be sunday? So for example it would look at today and make the date 12/9/2007 rather than 12/14/2007
View 11 Replies
View Related
Feb 24, 2013
I have a Userform that exports data. I tried adding the following code to clear the export sheet each time and it crashes:
Set Popul = Sheets("Sheet2").Range(("a2"), Range("A2").End(xlDown))
Popul.EntireRow.ClearContents
Additionally I want to leave the top row as it has titles that will be needed.
View 8 Replies
View Related
Jun 23, 2007
I need a macro to loop through a column and delete any date prior to todays date, as well as all cells in the deleted date's row.
View 2 Replies
View Related
Mar 13, 2008
Need to be able to highligh data within a range where the date in a column is for the previous month/s- therefore need to be able to also include in macro entering the current month - don't want to have to edit macro each month
View 2 Replies
View Related
Jan 28, 2009
I have a cell in which I will input the last day of a month (e.g., 1/31/09, 2/28/09, etc.) In another cell, I want Excel to show the last day of the previous month. Is there a formula to calculate this automatically?
I enter in Cell 1: 1/31/09
Excel calculates in Cell 2: 12/28/08
I enter in Cell 1: 2/28/09
Excel calculates in Cell 2: 1/31/09
View 2 Replies
View Related
Sep 27, 2009
I've been racking my head on this one.
I need a function where for a given date will return the date of a specified weekday in the previous week.
Example: If today is Friday Sept. 25th 2009 and I want to find the date of
the Wednesday in the previous week I would need something
like DATEPREVIOUSWEEK("09/25/2009", vbWednesday)
View 9 Replies
View Related
May 8, 2014
How to write a VBA code so that it would calculate the date of the previous Friday and from there Return the date exactly 1 month before; on any given day.
For example...
today is may 8th
So if I run the code the dates returned for last friday should be 05/02/2014
and 04/04/2014 should be returned AS the DATE exactly a month from 05/02/2014
View 6 Replies
View Related
Dec 1, 2006
how do i get the previous days working date in VBA, how can i get VBA to determine wether we are in the week, and how will i get it to know its a monday to retrieve fridays date?
View 3 Replies
View Related
Sep 27, 2009
Is there a simple way using VBA to find a date in the format of dd/mm/yyyy? I have a range on every sheet from A1 to IQ1 with dates already entered. I want to add this vba to some other code so the user can go straight to the date entered on the worksheet.
Using the edit find, it can find dates easily. Can this function be replicated through VBA?
View 9 Replies
View Related