Now() As Record Id; What Record ID Schemes Are Fequently Employed Besides Date/time
May 25, 2007
I seek advice on using the value of NOW() as a record ID in an address book program. Question #1: Do Excel developers often use a record ID? Question #2: What record ID schemes are fequently employed besides date/time? I have decided to create an Excel address book as an exercise to increase my knowledge of VBA, and also as a useful application for work.
I realize that a record ID is not essential in Excel in the way that it is essential in Access, but I feel the need to have some unique ID associated with each address, so that I may have different worksheets, with data related to a given Contact, sort and manipulate it, if necessary, but have the record ID as a way to restore the relationship of rows to a given Contact, and also, as a handy way to examine the data in the date/time sequence in which it was entered. I have experimented with the following code, to assure myself that I can access the number returned by the NOW() function, manipulate it as a string, and format in various ways if necessary.
Dim n As Double
n = Now()
sn = Str(n)
p = InStr(sn, ".")
first = Left(sn, (p - 1))
l = Len(sn)
d = l - p
S = Mid(sn, (p + 1), d)....................
I am creating an asset management sheet. For the formula I am trying to work out there uses 3 fields : ID, start date, and end date.
What I want to do is be able to show if the ID is duplicated within another record with an overlapping date. So an item is flagged if it is in the list within the same dates as another record. I tried a few countif formulas but with no success.. I may just be approaching the problem incorrectly though.
I have cobbled together some code that searches a folder of my choice and lists the files within the folder every xxx seconds for yyy minutes. The files it finds are listed in 'Column A', and between each search during the defined yyy search duration 1 row is added to seperate them.
I require the additional code to record the search time in 'Column B' of the corresponding Row, and the search date in 'Column C' of the corresponding row. The Time & Date will simply be the Computers Time & Date at the occurrence of the relevant Search interval. The code is as follows:
I'm having trouble while trying to use a variable in a cell reference. I have a sheet that is being used to record the time and date of data entered into the workbook. This sheet is divided into columns, each designated to a specific type of data. I have written a macro to enter the current time in the correct column, but that macro is embarrassingly long and complicated because I used a series of if statements to handle all the different data being entered. I'm trying to simplify by using vlookup, and assigning the column value to a variable, and inserting that variable into the cell reference.
Here is the line I need to insert a variable into:
I ran a Home Service Massage, with ten massagers and it's continually growing. I know I'm supposed to use a database for this, but I'm not very good in creating one. I am however confident in using MS Excel, so in a much as possible, I only want to use MS Excel, and strictly use formulas (if I can get away with it).
Anyway, I keep customer records in one tab, and all their personal info is listed there. There are two types of columns, which I'd like to call 'static' and 'automatic'.
Static columns includes Unique ID (number), Name, Address, Phone Number, etc.
Automatic columns, by the term I used, is filled automatically. This includes the total number of hours they have availed the massage from us, the names of massagers who serviced them, --- and my biggest issue --- the date of last massage. I can manually input this, but I normally forget, so I want this filled automatically.
Aside from customer tab, I have one tab for each massager. First column is the date, then 48 columns for time. Starting from 8AM, 830AM, 9AM... 730AM. Hence I have 48 of them. Each column is equals to 30mins of massage availed. I copy and paste the Unique ID from customer tab.
so A2:A32 are dates, and B2:BC50 is where I copy paste the unique ID. B1:BC1 are time labes.
Is it possible for me, just by using formulas, to populate the 'last massage date' column?
I am looking to create a macro that will create a new sheet when data is added on a summary sheet. Example.
1. Summary sheet called "Variations" contains columns that will contain the information needed for new sheet (Columns A to D)
2. When data is entered on "Variations" sheet: Column B, then macro automatically creates new sheet renamed to e.g. VO1 (Number used on "Variations" tab) and is a copy of "Master" tab.
3. Data entered in Column A to D on "Variations" tab is automatically entered onto new sheet created (e.g VO1). Shown is blue on attached file. Additional data is updated on "VO1" sheet and this then links back to "Variations" tab
When a cell changes i would like the cell in the next column to record the date of this change. After achieving this i want to set up conditional formatting to compare this date to the current date and if they are the same then change the original cell's colour to show it changed today!
I started using the code below (from ozgrid) which was working fine BUT my cell value in column A is actually taken from a different column. when the different column cell value changes my cell in A changes but the script below does not seem to see this as a change. it only records the date if i physcially change the cell in A rather than another cell prompting it to change.
based on my overall objective and my plans to date please can someone suggest a solution? current code below....
i have a spreadsheet with different customer names. I want to highlight a row every time a customer name changes. For example: ABC, DEF , i want to highlight where abc ends . Normally i use subtotals, then group them by rows then select visible cells then i highlight every different customer. The problem is that since it is a huge sheet, it takes 30 minutes to do the subtotals. I am not sure if conditional formatting can do this.
This problem seemed to revolve around "digital signing" with further macro changes done from a different machine (without the proper certificate). Excel warns of the problem and then "unsigns" the project.
I've got a problem with spreadsheets that I've been working on. Now, when I tell it to record a macro, I get the macro name, shortcut assignment dialog box and then an error "Unable to record." After "Ok"ing that dialog box, the normal recording macro dialog comes up. Also, lo and behold, there will not be a macro recorded.
I've got no protected cells or sheets and it doesn't matter what security level is set. It is a "signed" macro but I can take off the signature and still have the problem. I checked for "Help - About" for deactivated modules and there was none.
What I am trying to do is record the time when a task is completed on the spreadsheet. For explanation sake, lets say I have list of 10 tasks in column C 1-10. In column B 1-10 I have a button for each task. When you press the button for the task, the time it was pressed is recorded in D 1-10. To put the time in I used =now(). The problem that I am having is, when you press button 2-10, it changes the time in the cell above to the same time. So instead of have 10 different times in 1-10, I have 10 identical times,being the last button I pressed. I tried timestamp, time value, etc
What i would like to do is record a cell on sheet1 in sheet2 when it reaches a certain number i.e 2. The cell in sheet1 changes all the time but sheet2 must not refresh. Is this possible with a formula?
I know this is a simple question for all VBA droids...I guess the challenge is in how quickly I'll receive an answer. I hear the turn-around time on this board is pretty impressive. So here goes...
What is the VBA code for recording the current date without the date recalculating when the form is re-opened. I know the formula for automatic entry [=today()], but I need the date to stay the same. I can assign the date to any cell, so you may theorize any cell in the code. Remember...the trick is getting the date to stay the same once it's been automatically entered.
i am building a data base and every day, say, at 5pm a certain cell should contain a corresponding date. In my macro I simply wrote
I thought naiivly it would work, but it doesn't, as the next day the date will be changed correspondingly. So, the question is: how to record todays' date (Dec 29) so that this date stays in this cell forever? Only the date, not Excel Dates & Times
We have multiple work orders per opportunity, and each work order has a date. I have a sheet of these work orders which shows the work order #, work order date, and opportunity date. What I want to do is add a column which reports the work order date if it is the earliest instance of a work order for the opportunity (said differently, the first work order for the opportunity). Is there a way to write a formula to report whether the date of the row is the earliest date for a given opportunity, all in the same table?
I have two sheets one = where I am entering day to day data two = For getting result
Once I entered data in first sheet then I want date wise record in another sheet in which I will enter date. After entering date all the record will be inserted in another sheet from first sheet And main sheet will remain with all records
I have an excel file with the ID, Name, workID and Creation date fields. Some people have several work ID's created in different times. How can I select row that contain work ID's that were created the latest. I may have several records per person, I need only the latest record. File contains about 3000 records, I can't go through all of them.
I have this table as my simple little database and I have to extract some info from it and keep track of dates and deadlines...
A B C D E F G H
I have to get the following data, I need to lookup the last visit date out of all dates associated with a specific name in column "A".
This requires that I test an unsorted table for a value in column "A", i.e. "test2". Then determine which record has the latest date.
In other words, If I test for the value "test2" in column "A", I find I have 2 records, with dates ranged across "D4:F4 and D7:F7".
I need to return the latest date found in those ranges...
The purpose here is to write a function that will find a range of dates associated with a name in an unsorted table, from that range find the latest date, then add 90 days to that date and display the results....
I have been trying to employ a form of, =VLOOKUP(E3,$B$3:$D$11,MATCH($F$1,$B$1:$D$1,0),FALSE) and =INDEX(Table_Array,MATCH(Lookup_Value,Lookup_Array,0),Col_Index_Num) combined with "IF" functions, but to be totally honest I am COMPLETELY lost here....
I have a template file that I import data in to, which is then saved with the current date. This works, but I want to automate the import of the data, but ensure I don't duplicate the load. Therefore, I have a tab 'FileLog' that I record the filename (variable by date) in column A and Creation timestamp in column B.
How do I obtain the filename and creation timestamp of the import data so that they can be entered?
I am building a form that uses a combo box to lookup up a row in a table and return row data. To make things more complicated I want to return more than one record. For example: the table has a list of jersey. I search for a style jersey. I want to search the list and return all the colours for the chosen style. Sometimes there is only one colour or there can be up to 10. Have a look a the attached example.
l would like to record a macro that allows one finds a 'key word' in sheet 1 ,then the macro should copy the entire raw of the search results to worksheet 2 .The macro should enable the user to have as many searches as possible but pasting all the results on one worksheet.
I have designed a website for my uncles business and I have used numerous forms in vba. One of the things he wants me to do is display a list of some of the client details on a new work sheet and I have hit the wall..
I have about 6 worksheets,
The ones i need to access in this instance will be clients.xlsm and the temporary one i have created each time the form is run called temporary.xlsm
I need to search for a particualr client number in row A on the client list and return column number 2 and 3. Usually i would use the match or vlookup function but row A contains the client number numerious times.
However, (this is where I am stuck) there are multiple client id's in row A. For example the client ID i am searching will exist say 3 - 6 times in row A and i always want to return the row number in a new cell on the temporary page each time it has found it.
I am searching for the client id in worksheet("clients").range("a:a")the client id is repeated and I want to return all the rows if there is a match, but match will only return one row...
would it be a for loop with a match function? -
when I find a match i want to be able to record some of those values on the same row it has found a match on the temporary worksheet