I have an Excel worksheet full of data. I would like to search in a specific column for cell that contain "xyz". If found cell = xyz, then I want to delete the whole record or row.
Is there a formula or option to do this?
I am currently looking at each record and deleting it manually. With a worksheet of more than 2000 records, this become a huge task!
I have a ListBox in a UserForm that displays multiple branches. I can't figure out the code to delete the selected record? if the user selects "Yes" from the MsgBox?
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 a comparison model that looks at two weeks of data. I am trying to get around the deletion and insertion of records week on week. With the code below, I can currently find and correct the deletions and insertions to the list, and then resort the list so that the comparison will work.
Sub CheckForNewProjsRemovedProjects() Dim MyCell As Range, oCell As Range, NewCell As Range Dim Rng1 As Range Set Rng1 = Range("A1:A" & Range("A" & Rows.Count).End(xlUp).Row) ' Columns("B:B").Select Range("B1:B" & Range("B" & Rows.Count).End(xlUp).Row).AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Range( _ "C1"), Unique:=True For Each oCell In Rng1 For Each MyCell In Range("C1:C" & Range("C" & Rows.Count).End(xlUp).Row) If MyCell.Value = oCell.Value Then................
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
The added piece I now need to put in is how many times a cell value is changed in a day (I will add to a macro to return it to 0 at the end of each day). The way in which I would approach this is by using a combination of a cell_change and count function. Could I ask somebody to advise if this is the best way?
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....
Could it be possible to "sequentially offset" a vlaue, say, of A1 such that, for instance, when A1 changes from "5" to "6" (via formula, not direct input), A1=6 and, say, B1=5, and so on? You know, like keeping a value record of A1, one step back, in B1.
This would be UNBELIEVABLY valuble to me. Thus, would I be in eternal debt to he/she who would resolve this here.
I'm working on a spreadsheet that has a counting number value on the cell L2 and a score on cell L4. These cells will be changed during the day, L2 always increasing, but not with a uniform increment. The interval between the changes also varies. Each time L2 changes, L4 may or not change. I'd like to keep the record of the changes on L2 and L4, each one in a row, together with the date and time when the changes where made to L2 and only add one new row if the L2 value has changed. The records should start from line 6 on...
See the attached file for more details. Currently I'm doing the updates to the record rows manually, I'd like to make it automatic every time the value of L2 is changed from the previous value to a new one.
Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$L$2" Then If IsNumeric(Target) Then 'Stop any possible runtime errors and halting code On Error Resume Next 'Turn off ALL events so the Target * 2 does not _ put the code into a loop. Application.EnableEvents = False............
The below code works fine except when there is no recorset found then i want to display 0 in the cell but its not doing it. The code just leaves it blank if no recordset found.
What I'm trying to put together is a sheet where i work out how much margin i will be making on a sale (which i done). The bit I'm stuck with is the recording the data on a separate sheet.
What i have done so far. I created a Macro button to insert and copy cells C6, C7 & C8 (the bits i need). Which works but it takes the formular with it so everytime i chage the figure on sheet 1 it changes in sheet 2.
So what i'm asking is there a way to mirror what is display rather that copy?
I am trying to create a continuously updating record or log of the numbers in a particular cell that has numbers that change frequently. I want every number that was every in that cell recorded in a table or column so I can analyze those numbers. Please note that I do not have much VBA experience.
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 have mocked up a typical example between sheet 1 and 2. I have found tools that will identify cell entry changes (i.e. c & d) but not on cell comment changes (i.e. a & b).
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.
I've got working routines that do some action upon double-clicking within a specific range of cells. I want to be able to "wrap" this routine within a routine that will record the activeCell prior to the double-click and, upon completion of my routine, return to that prior location.
I am not sure how to go about creating a spreadsheet that does this:
I have a number much like a stock market index which is in cell A1 for instance, and this data changes every second,
And I wish to create my spreadsheet to automatically make a record of this change value and populate it at the last available blank row, so ultimately, I have a full history of how this number changes during the course of time.
5450 in cell A1 a second later, it changes to 5430 and so I want to populate 5430 to A2
and then another second, it changes from 5430 to 5470 and so i want to populate 5470 to A3 and so forth....
I have to make a table that shows that a if someone purchases
less than 5 items they receive no discount 5-10 items they receive 2% discount 11-20 items they receive 5% discount 21-50 items they receive 8% discount over 50 items they receive 10%
and it has to be done in a way that the discount rate can be calculated using Vlookup I am struggling to find the best way to write this table. i tried numbering 1 to 50 and writing the corresponding discount rate in the second column but this looks untidy and can't calculate greater than 50 as i am not sure how to write it in the cell so it reads as >50 and not just 50.
Recently I have been practising writing my own macros in VBA. I am using Excel 2010.
I have been trying to write a macro to look at two columns in a worksheet (say, columns D and E) and to delete the contents (not the formatting, and I don't want to delete the cell itself) of that cell only if it contains a numerical value (e.g. 1, 2, 256 or any other number). If it finds a cell with letters, then it wouldn't delete the contents of the cell. The cells are currently formatted as "currency" cells.
I have been trying all sorts of things and I just can't get it to work. I can write a macro to clear a range easy enough, but I am stuck on getting it to delete the right stuff. I won't embarrass myself by uploading the code that I have been using..
I have a huge database. I am looking for a macro that can search for a particular word. If a match is found, the macro should do two things simultaneously... (i) delete the contents of the cell in which the match is found........(ii) display the same contents 1 row below and 1 coloumn to the left of this cell where the match is found. For e.g....
I have a sheet in Excel 2004 for Mac that is a patient list with over 2000 patients. I need a rule that will compare values (patient IDs and responsible party ID) in two adjacent cells, if the values are different, to delete the entire row. The goal is to get rid of patients (rows) that are not the responsible party (responsible party ID).