I am trying to automatically add a date to a cell (D2 on sheet1) when there is data entered in a range of cells (C8:I59) on sheet2, so I can see the date of the last there was data entered.
When entering data in any cell in a excel sheet I would like the previous date to automatically appear in particular cell so the cell will show the date I entered something in the cell. I want the date to be a fixed date, I don't want it to change.
On entering something in a different cell in the sheet, the date of the cell remain same. After saving the sheet, the next time I open it the dates will still have to be the same as they were the first time.
I want to enter the word 'Closed' in cell B1 when the due date in cell A1 is exceeded by 272 days. I have tried using conditional formatting and excel accepts the formula but nothing seems to happen. Here is what I have tried;
"A" in cell A1, B in B1, "C" in C1, "D" in D1, "E" in E1 and "F" in F1.
There are two projects.
Project 1 has phase A, D & F and Project 2 has phase A, B, C, D & E.
My Specification follows...
1). Take Prject 1 - Which starts from A...in cell A2 I will keyin "A". When the phase comes to an end I will key in the end date of the phase. As soon as I key in the end date in cell A2 Letter D should automatically appear in the cell D2 and when Phase D comes to an end I will key in the end date in Cell D2 which should automatically keyin F in the cell F2. and is the same case for Project 2.
I have the following Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub If Not Intersect(Target, Range("A2:A100")) Is Nothing Then With Target(1, 2) .Value = Date .EntireColumn.AutoFit End With End If
End Sub
I just want the date to appear in cell H6 autmatically and the time to appear in H7.
I have a cell that is constantly being changed from a date to a number. Excel automatically formats the cell as a date when a date is entered but if I re-enter a number it leaves the format as a date.
Is there anyway to automatically change the format back to general if a date is not entered.
I had this bit of code obviously it dosent work.
If Target.Cells.Count > 1 Then Exit Sub If Not Intersect(Target, Range("E8:E46")) Is Nothing Then If IsDate(Target.Value) Then Target.NumberFormat = "d/mm/yy;@" Else Target.NumberFormat = "General" End If End If Cancel = True
I am creating a time sheet for a supplier & when the supplier enters a date into column A I would like a new line to be inserted below & include the formatting, formulas & data validation from the row above.
how to lock a cell date automatically after the user saves changes, it's current format it is a tick box with a reference cell Today() but it need to be locked once completed,
I am trying to simplify a spreadsheet. I have a column with dates from last year and I was wondering if there is a formula that would automatically change the color of the cell once the date is over one year to the day to show that the date in the cell has expired?
I have created a user form using the addins that come with excel to create a calendar that will allow the user to select a date and automatically put that in a specific cell. My system is office 2000.
The code is as follows:
Private Sub OK_Click()
Dim i As Integer Dim myCell As Range
i = 0
For Each myCell In Selection myCell.Value = Calendar1.Value + i i = i + 1 Next myCell
Unload Me End Sub
Now, I gave it to my boss who has xp, and I get the following VB error when she chooses a date and clicks on the ok button:
I am looking to have a macro which will automatically add the username and date to a cell, when the cell above changes (or in this case =x). I have a bit of code from a previous project, but I have changed Target.Row to Target.Column and it is not behaving as I require:
Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Range("B2:BZ2"), Target) Is Nothing Then Range("C" & Target.Column).Value = Format(Date, "dd-mmm") & " " & Format(Time, "hh:mm") & " by " & (Application.UserName) End If End Sub
See the attachment for the example. What I need is whenever row 3 ="x" I need the corresponding cell in row "d" to update with the latest date, time and username. Please not the macro is currently not active on the sheet as i've added the ' character.
when i use this code i wnat the date to automatically appear in the text box but it doesn't I have type something into the textbox then the current date appears,.
I have a sheet(Sample.xlsx) in which weekly data is collected and this is done by using the VBA code(Present in Copy 1 and Copy 2 button in Master US.xlsm) written by me. But in my code, it inserts a new after asking two parameters, i.e. line range(i.e. row no for eg A64) and date. I want it to automatically search row containing last date and inserts row below it and this needs to be implemented in "Insert Automatically" and "Insert Date" button using VBA code in Master US.xlsm sheet.I dont have problem with second paramenter.
Logic i want to use :
Itergation of whole page { If (col A<>Date)&& col A=Average(i.e. contains average word) then inserts row above that row
And then ask for date to enter using date variable.
then inserts row above that row containing last week data in col A. }
"Insert Automatically" in Master US.xlsm sheet is the button which takes system date and implements the above logic. "Insert Date" in Master US.xlsm sheet is the button which ask for only date and implements the above logic.
I want each workbook to contain one month's worth of sheets, with a sheet containing one day's appointments. I need an easy way to name each sheet tab with the date, for example "01/08/09 Tue" for the first sheet and then all the following sheets will follow on date wise ie "02/08/09 Wed".
I have a spreadsheet with data in cells A36 to G52. In The D column (D36 to D52) I have a date in there. I would like to have this column sort in ascending order automatically, but also have it sort the other data within the same row with it.
I have tried a couple of VBScripts that I have found in other posts that are similar, but I just get errors when trying it so I assume that I am not putting something in correctly.
Can anyone help me write this functionality? I have other data in a similar setup on the page that I also want to sort automatically but the script for this first part should be just a copy and paste, and change a couple of values....at least I am assuming so.
I have 2 Excel Files. In the main file I have a macro that copy/pastes data from the secondary file. The secondary file is a daily file that gets its file name changed every day (eg. 14OCT09.xls).
The last piece of the Macro goes back to the secondary file and ends with:
Windows("14OCT09.xls").activate Range ("A1").Select
Now tomorrow, I have to manually edit the Macro and change the code to 15OCT09.xls before I run the Macro. Is there a way to automatically change this date without having to manually edit it on a daily basis?
This code below is pasted from Automatically Add Date, Time or Date & Time and uses the Worksheet Change Event
Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count > 1 Then Exit Sub If Not Intersect(Target, Range("A2:A100")) Is Nothing Then With Target(1, 2) .Value = Date .EntireColumn.AutoFit End With End If End Sub
It automatically enters today's date into the corresponding B cell. How do I code it so that the date is automatically removed when & if I delete the corresponding A cell?
Each worksheet has 4 days on it.. and there are 4 worksheets per month ( Jan1, Jan2, Jan3, Jan4 ). I have this macro which runs ( dependant on password ) to lock all cells so they cannot be edited after. On this macro I have to enter the month to lock and it adds on the 1,2,3,4.
Sub LockCell() Dim i As Integer Dim ws As Worksheet Const Pass = "password" Dim InptPass As String Dim Mnth As String
On Error Resume Next
InptPass = InputBox("Please Enter Password")
If InptPass <> Pass Then MsgBox "Incorrect Password", vbCritical Exit Sub Else...
I'm trying to update an excel document which has a list of employees on it along with their training. Most of the training for individuals needs refreshed in the next year so wanted the table to use the date and perhaps trigger a fill colour change once they are close to needing that training. here's an example
John Smith course 1 Completed 01/05/10 Refresher required 01/05/14
Once we get a month or two before the required date, I would like the fill colour to change to highlight that they refresher training should be organised soon.
Everyday I receive products that could be categorised into one of the five categories A, B, C, D and E. I enter these on a sheet (SHEET 1) along with an expected date of shipment, which could be any date between now and 12 months later.
In another sheet (SHEET 2), I have months in column A and each product type for each month in column B.
What I want is to write a formula in SHEET 2 so that every time an entry is made in SHEET 1, it automatically adds 1 to the respective cell in SHEET 2. For example, I received 10 products today (5*A, 2*B, 1*C, 1*D and 1*E). As soon as i made entry in SHEET 1, I wanted respective numbers to appear in SHEET 2.
I have made a daily planner for each month. The dates are on separate sheets which are titled 1st Dec 07, 2nd Dec 07 and so on.
This is also included on the actual sheet as well in the form of a heading. I want to know if it's possible to automatically rename the text on the sheet to what the sheet is called?
Or if the first sheet has a title of '1st Dec 07' how can I get the other sheets to automatically be titled in sequence so I don't have to do it manually?
I have an excel sheet that uses date formulas in order to provide data regarding the date that it brings up. My problem is that the formulas do not bring up dates unless the dates are on a weekday. Ex. I would like to look back 3 months in the past, and I do so using the formula =today()-90 (90 for 90 days, about 3 months). I would then like to input this date formula into another function (potentially an if function) so that if today-90 is a saturday or a sunday, the function will automatically bring up the date for the friday preceding it.
I have found that periodically Excel is automatically reformatting everything in large workbooks to Date Format. Initially I save these workbooks with General, Number, Currency, Text, and Date formatting within the cells. Upon opening at a later time, everything is converted to Date Format.
I am trying to create a spreadsheet that will automatically calculate a date in the future.
The future date calculated needs to take the time NOW (as the user completes a field) and determines if this is before MIDNIGHT on the following SUNDAY. If so it calculates the date as a Tuesday 2 weeks on. For example... I request a date now on 1st Jan which is a Thursday. This is before midnight Sunday and so the date calculated would be Tuesday 20th January.
If the time NOW is after MIDNIGHT Sunday and before the next TUESDAY.. ie 0001hrs on the Monday and 2359hrs on the Monday then the date returned should be Tuesday 3 weeks on.. e.g 27th.
It would also need a function that would allow the total number of referrals on a Tuesday to 20 at which point it would overspill and provide a date on the Friday of the same week.. so in the first example it would be Friday 23rd
Is this something that can be achieved with formulas and a set of dates for it to calculate from or do I need to find someone who can do it in VBA for me.
Is it possible to have a macro run when a date is changed each month instead of clicking on the button. I have a few macros that are ran each month in a spreadsheet (manually) but would I would like to have them run automatically when the date is changed in cell a4 each month. The date in cell a4 is always the last day of the month. Also the name of the workbook changes each month