Unique Timestamp When New Worksheet Is Created
Oct 14, 2008
for my kind of business we start off with 1 worksheet that has the original plan. We name this sheet "R(0)"
Every time the plan is revised (modified) it is only done by first creating a new worksheet then saving the revisions there. When we create a new worksheet it is automatically named "R(1)" , as in Revision 1.
My request is the following;
i have placed cell number "D86" to reflect the unique date that the sheet is created, so that every time a revision is done when creating a new sheet, the idea is to have this cell automatically update, inorder to reflect the date & time the revision was created. So at the end of the week when you have 5 revisions (5 worksheets), each worksheet will reflect the unique date & time of the revision.
View 9 Replies
ADVERTISEMENT
Feb 11, 2014
I am trying to have one cell (G5) populate with a timestamp when a change is made to any cells in a range (some are merged). The code below worked for a second, until it didn't.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("F8:G33")) Is Nothing Then Exit Sub
Range("G5").Value = Now()
End Sub
*Getting a yellow arrow by the row starting with Range("G5")
View 6 Replies
View Related
Oct 23, 2012
Excel 2007
I have a few dozen pictures created when a macro runs. They all have unique names. I'd like to add comments to cells, where the cell.value decides which picture to pull. All the examples I've found online show how to do this if you have pictures saved on your hard drive by referencing the file path "c://mydocs/...blahblah/"
Is there a way to reference the pictures I've created/named with my macro?
Here's the snippet of code that creates the pictures and names them:
Code:
For i = 2 To Application.CountA(Sheets("Allocation").Rows(1))
Sheets("Allocation").Activate
Set rInput = Sheets("Allocation").Range(Cells(1, i), Cells(10, i))
sPicName = "_" & Sheets("Allocation").Cells(1, i) & "_"
sSheet = Sheets("Allocation").Cells(3, i)
dDate = Sheets("Allocation").Cells(5, i)
[Code] ......
Here are some examples that are close to what I'm looking for.
VBA Popup Pictures - 1108 - Learn Excel from MrExcel Podcast - YouTube
VBA Express : Excel - Add pictures that float like comments.
View 4 Replies
View Related
Feb 15, 2009
I'm not sure if this is possible. But here it goes. Here is how my spreadsheet stands. I have a sheet called "Dates." When I input a date into a cell it creates a copy of a template and titles it with the date (eg 2009.02.15). What I then need is for some of the cells of this newly created sheet to be linked to cells in other sheets in the workbook. These other sheets serve as databases so to speak and will collect, tabulate and analyze the data from the various sheets created for each day in the Date column. I hope that is clear.
I thought that by creating this Dates sheet I would be able to link the cells in the database sheets to the new sheets that will be created. When I tried this, however, it did not work. The sheets I want to link will have the name of the text that will be entered into the Dates cells. For example. If I put 2009.02.15 in A2 I will want the corresponding cell in my database sheet to have the formula =2009.02.15!C12. Is it possible to make this link before there is text entered in A2 and before the new sheets even are created. I have not been able to do so yet.
I was tryin to think of another way and I came up with this. Here is the code I use to create the new sheets.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim wsNew As Worksheet
If Target.Cells.Count > 1 Then Exit Sub
On Error Resume Next
If Not Intersect(Target, Range("A1:A10")) Is Nothing Then
Sheets("experiment template").Select
Sheets("experiment template").Copy After:=Sheets(Sheets.Count)
ActiveWorkbook.Sheets("experiment template (2)").Tab.ColorIndex = 5
Sheets("experiment template (2)").Select
Sheets("experiment template (2)").Name = Target.Text
End If
End Sub
I was thinking it would be easy for this code to link the cells from the new sheet to the existing database. However, I then ran into a problem down the road. For each new sheet created (each new date entered) I want it to enter the values into the subsequent row in the database. Not keep on overwriting the same row. It seems as though there should be code for this but I am not sure how to do it.
View 9 Replies
View Related
Jul 4, 2014
I am completely new to Macro's and VB and the macro below has been generated using the "Record Macro" function in Excel 2013 with a couple of very minor modifications based on some research I have done (hyperlink & input box). My ultimate goal is to make a copy of my "TEMPLATE", which is hidden and the copy could have a variety of names, then create an entry in my "SUMMARY" table that references cells on the newly created sheet. The new entry on the SUMMARY page should be entered in the next available row ... at the moment I need to make sure I have my cursor in the right place before I run the macro. I also want the first cell in the new "SUMMARY" row to create a hyperlink to the newly created worksheet.
The macro does what I need it to do, as long as I name the new sheet "Test", what I would like is for the Macro to recognise the name of the new worksheet and create links to that name. The rows and columns in each new sheet will remain the same, hence the R##C## part will always work.
The "SUMMARY" and "TEMPLATE" worksheet names will not (ever) change.
View 4 Replies
View Related
Oct 19, 2007
My program(which is an add-in, or will be when I've finished writing it) creates a new worksheet called "Groups Summary" I would like this sheet to be locked so that the user can not modify anything on it. I would also like that if they double click a cell this will launch a userform if based on certain conditions.
I believe this code would have to go in the worksheet itself, so the question is how do I get the macro to enter code into a worksheet that it creates?
Is there a way to write it in a standard module and then automatically copy it when the worksheet is created?
View 10 Replies
View Related
May 3, 2012
I am creating an invoice form in Excel 2003. I like to know if it is possible to increase the value of cel A1 by one everytime a new sheet is created.
For example i created my first worksheet and gave an invoice number 001. Now I create a new worksheet by right clicking on the tab and choose copy/move. I like the second work sheet change the invoice number to 002.
View 8 Replies
View Related
Aug 2, 2014
I've written a little VBScript that generates several hundred Excel 2013 worksheets. In order to protect the users from themselves I protected certain cells. Everything works as expected, except when I discovered that the password I used to protect the worksheet doesn't work to unprotect it. If it matters, I'm not trying to unprotect programmatically, just opening Excel and going that route.
Here's a snippet of my code:
objWS.protect Password="abc123"
View 2 Replies
View Related
Aug 22, 2007
I have a FOR loop which is supposed to loop through all the worksheets in my workbook, create a named range, then add some data to the right of the range. However, when I run my code, all the named ranges refer to the last worksheet in my workbook. The loop only seems to be partly working, and I just can't work out why.
Sub maxLifData()
' for each worksheet in the workbook, do dmax formulae and add results to new sheet. bhole id on left, depth across top.
Dim ws As Worksheet
Dim wsName() As String
Dim i As Integer
Dim mCount As Integer
Dim nr1 As Range
Dim nr2 As Range
Dim head1 As String
Dim head2 As String
Dim wsRangeName() As String
Dim maxF As String
Dim fRange As Range
Dim rng As Range
Dim mRng As Range
head1 = "STCN_DPTH"
Set fRange = Range("G3")
Set mRng = Range("A2")
Redim wsName(Worksheets.Count)
Redim wsRangeName(Worksheets.Count).............
View 4 Replies
View Related
Oct 2, 2008
I am trying to make sure that I give my worksheet a unique name in the workbook. To do this I create a name that really really really should be unique, but just in case I also try to check it against existing worksheets, and this is where I am having the problem. I thought the following code would trigger the 'goto' on a 'subscript out of range' error (ie. the sheet doesn't exist), and then carry on:
View 3 Replies
View Related
Jul 3, 2008
This is just a screenshot of my huge data of over 60,000 rows. Owing to the restriction of HTML Maker, I am just showing in less than 30 rows in this screenshot.
I need to extract only the UNIQUE ROWS depending upon the column called "Unique Code" to another worksheet. A particular row or a record is repeated as many as 90 times in this database. I need to extract the whole row which is unique depending upon the column C which is "Unique Code".
I have tried the Advanced Filter option a couple of times but it does not seem to work. Also, the Auto Filter option is not versatile for such amount of data.
View 9 Replies
View Related
May 11, 2006
I'm trying to do is a unique list or summary of a worksheet. First there are 4 columns that need to be read, then from this list a new list must be created using advanced filter with unique value. Then the first 4 columns must be deleted and replaced with the new 4 columns, in the third summary the totals for Gender 1-3 are aded together depending by the quality and the same for gender 4-5. I'm attaching a sample file to show how the summary is supposed to look when is finished. I need to do this in code because the rows may vary depending on the brands, genders and qualities. I deleted some info to reduce the file size
View 2 Replies
View Related
Jul 7, 2009
I have one worksheet which acts like a data dump (actuals) where data is just pasted in. This worksheet is sorted and edited on a continues basis. I need this data to be sorted into their respective coded worksheets (110, 120, 130).
I would like a function in Worksheet 110, 120, 130 that captures the data for that 'code'. Now the issue is that much of the data is non-unique, dates, codes, accounts may sometimes be duplicated however i still want to display the entries separately in their respective coded worksheets. (I had a solution using column numbers however it isn't viable because the data gets resorted often)....
View 14 Replies
View Related
Jan 13, 2008
I am getting a run time error 1004 during a copy-paste of a named range. I've read other posts and the help file and know it's related to defining an object, but I'm not clear on exactly what hasn't been defined.
Private Sub Worksheet_Activate()
Dim lCell As Range
Set lCell = Worksheets("Sheet1").Range("C65536").End(xlUp).Offset(1, 0) ' find first blank cell in the column
With Worksheets("Sheet1").Range("AllDates") 'filter duplicate dates
. AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Range( _
"E7"), Unique:=True
End With
Worksheets("Sheet1").Range("Dates_Filtered").Copy Destination:=Worksheets("Sheet1").Range("lCell") ' fails on this line
Range("Dates_Filtered").Clear
End Sub
View 3 Replies
View Related
Dec 29, 2006
Is there a way to put a time stamp with the users name into an adjacent cell when a cell is updated?
In case that didn’t make sense I will tell you what I need this for. We are creating new time cards that require both employee and manager approval on them. We have many remote employees and getting their signature can be a pain. If they could click a button on the time card that stamped their name and time that would be ideal. They would then send to their manager they would click to verify the time and it would stamp it as well.
View 12 Replies
View Related
Jan 23, 2009
I would like to set up an Excel spreadsheet for conducting a time and motion study in a workplace setting where someone follows an employee around to document how much time is spent on a variety of activities. Since the person would have a mobile tablet PC to walk around with and track the data, I would like to capture 3 fields of information:
1) Category of function being performed
2) Start date/time of function
3) Stop date/time of function
For #1, I would like to have a drop down box that appears in each row of Column A with a predefined list (i.e. Activity A, Activity B, Activity C, etc.). For #2 and #3, I would like to create a macro that "timestamps" the current date/time when a blank cell is "clicked".
View 5 Replies
View Related
Mar 27, 2009
=IF(D2<>"",IF(A2="",NOW(),A2),"")
Whenever I type into field D2 it populates current date and time in field A2 and down the A column as I write into current D columns. The next step I would like to do in which he was able to figure out so far is how to lock in the date and time after something has been typed into D2. If I make any changes to the D2 field it updates the date and time, which I dont want to happen.
View 3 Replies
View Related
May 15, 2008
What formula would I use if I wanted this:
If A1 is greater than 1 then B2 equals the time that I entered a # in cell A1
View 9 Replies
View Related
Apr 11, 2014
Is there anyway to create a timestamp based of a cell linked to a Listbox? For example if the linked cell is in cell C8, cell D12 would stamp the time.
View 1 Replies
View Related
Aug 17, 2009
I am using the following code to add in an entry to the sheet named "Upload Log". I am currently using the "Now" function to input date and time. problem is everytime the sheet changes the formula changes and alters the times. I am trying to create a log of each time this code runs. so I have a record of it. This code seems to work but rather than placing the formula in the cell as I have written here, I just want the code to place the values that formula would place, but not the actual formula. How can I change this code to do that?
Code: ...
View 9 Replies
View Related
Nov 21, 2009
I have A column that has values 0 or 1 (product active or not).
I want to add into B column date when change occured (from 1 to 0) but simple NOW or DATE is not working becouse program works so that it erases/resets all values and calculetes tham again wich resets mine date also.
How can i remamber value 0 and if it stays the same after reset that date in corresponding cell in B column stays the same and not resets.
Maybe some form of check is there date in B before chacking status in A?
View 9 Replies
View Related
May 17, 2002
I have a problem similar to Ozone64's posting of 4/23 that I am trying to generate automatic time/datestamps in a cell whenever a value is entered in an adjacent cell. I am currently using the function =IF(A3"",NOW()) but the problem is when data is entered in subsequent rows the previous timestamp is overridden with the new timestamp. Thus at the conclusion of data entry every row ends up with the same date/timestamp as the final entry.
View 9 Replies
View Related
Oct 25, 2008
I am attempting to enter Timestamp data from a movie in this format:
minute:second.millisecond
When I enter a frame timestamp of 18 minutes, 42 seconds, and 5 milliseconds, excel auto formats this data to 12:18:43AM.
This is not what I want. I have attempted multiple types of cell formats in an attempt to enter this data without auto formatting. One requirement for the format is the ability to subtract two of the times for a change in time measurement. I have tried every setting under the "Time" format list, as well as custom formats, which fail to subtract.
View 9 Replies
View Related
Jul 17, 2009
I've seen a lot of timestamp solutions but none of them fit my needs. Also my VBE skills are not good enough to create this. So here's the problem:
I've got 3 columns E,F en H. H contains a validation list with 3 options OK, NOK and OPEN.
If H is NOK I would like E and F to be blank. If H is OPEN I would like E to contain a start date wich doesn't update. If H is OK I would like F to contain an end date wich doesn't update.
View 3 Replies
View Related
Sep 12, 2012
I am trying to set up my doc. so that when i double click with in columns (B&C)) the current time get inserted in a 24hr format. I am also trying to do the same thing but with a date formula (column A, also with the double click feature).
View 6 Replies
View Related
Jul 19, 2013
I'm trying to make a directory whenever the macro runs that includes a timestamp. File names cannot include "/" or special characters, so I'm trying to change the format. However, even though NumberFormat changes it, excel still recognizes the date as having mm/dd/yyyy etc. so the directory cannot be made.
Here is a part of the code:
ActiveCell.FormulaR1C1 = "=NOW()"
Selection.NumberFormat = "yyyymmdd-hhmm"
DateTime = Selection.Value
strFileName = "Data Pull"
MkDir "C:..." & strFileName & DateTime
View 3 Replies
View Related
Jan 8, 2007
how I can modify the below code so that it populates the timestamp in the same row in Column E if Column A is populated with data...
Example:
Cell A1 is populated then populate Cell E1 with timestamp
if
Cell A4 is populated then populate Cell E4 with timestamp
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Target.Address = "$A$2" Then
With Sheet1.Range("E2")
.Value = Time
End With
End If
End Sub
View 3 Replies
View Related
Jul 5, 2012
How to modify this code so that I select only one column triggers the time stamp update? For e.g. if i make any changes in column A, the date stamp is updated in the corresponding cell in column B. Basically, I am trying to narrow down to only one cell in the row, but it should work for any row in the sheet.
Refer to the below post: [URL] ....
VB:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row > 1 Then Cells(Target.Row, "B") = Now()
End Sub
View 2 Replies
View Related
Apr 9, 2013
I have the below code that works fine. However I want to use a countif function to update Column I instead of manually having to type in the numbers each time they change. I know it would probably be a Worksheet_Calculate Sub but cannot seem to find one that works. The time stamp would be put into column H and the first row of data is row 3.
VB:
Private Sub Worksheet_Change(ByVal Target As Range)
With Target
If .Count > 1 Then Exit Sub
If Not Intersect(Range("I3:I12"), .Cells) Is Nothing Then
Application.EnableEvents = False
[Code] .....
View 2 Replies
View Related
Jul 3, 2014
I received some time stamped data in this format: 06.08.06.000000000 PM.
convert to HH:MM:SS ?
View 7 Replies
View Related