I have some code that works fine below. It deletes an entire row based on the value in column J.
Ideally I would like to give the user the option to choose which column to base the deletion on. i.e. some kind of drop down box or input parameter where they could choose a different column "A", "B", "C" etc...
Private Sub CommandButton1_Click()
'Removes values less than 0
Dim rng As Range, cell As Range, del As Range
Set rng = Intersect(Range("J1:J1000"), ActiveSheet.UsedRange)
For Each cell In rng
Is it possible to set parameters on a query but use a wildcard to return all instances? I have a query that I want to be able to set multiple parameters on but give the user the ability to select as many or as few parameters as they want to see. 2 of the parameters are number fields and 2 are text fields with no spaces.
I have a question to ask, and not sure what you would call it. I am looking to input a 'Check Box' into a cell so you could have for example... two (2) choices - Yes - No - you would have an empty circle in front of each, and you select the one (1) you wish which would make it filled.
Is there a way to do this in excel? If there is, could someone possibly turn me in the right direction (or assistance) with inputting this?
I've just been asked to do a new Quality Control project for my boss. What I'm looking to do is be able to input the thickness values of our product in one worksheet, and have it recorded in another, as well as have the data separated by the model number
The main problem I'm having is figuring out how to enter data in the 1 worksheet as a template, and have the data consecutively stored, one after the other
Are there any functions that will allow me to do this?
I discovered this sample database sheet (attached) on the forum I wanted to ask if a picture can be linked included? i.e. when entering a new record a picture (stored in a directory) can be added and linked to that record. Then when reviewing the records the picture is then displayed.
I have a sheet with a number of different columns, is there a way that when data is input into a cell in the first column that it time stamps the last column on the same row, and this time stamp is fixed. Then when data is input into the cell below the same thing happens, so i can have a time stamp for each entry.
I have a worksheet with 500 rows. Coulmn A is all the dates of the items. Is it possible to somehow havea userform or something that I input a start date and a finish date and it only shows me that info.?
i m making a very small calculator. It's a little hard to describe, but I need to look like the following Let's say the individual got here on 1 Jan
Phase 1 is for days 1-14 last for 14 days Phase 2 is for Day 15-35 last for 21 days Phase 3 is day 36+
This is what I need it to look like: All the phase information will compute automatically after inputting the date arrived. In addition I would also like to be able to change one of the phase dates and the remainder of the phases compensate according to the newly entered date.
Date Arrived = 01 Jan 09 Phase 1 = 01jan09 Phase 2 = 04Feb09 Phase 3 = 05 Feb09
i have 1 - 9 number buttons, the +, - , * , / , and a C for clear, as well as an exit button. the display is a label. i have to click add after inputting the digits just to have it added to he variable, which i just add up at the end... terrible.
Option Compare Database Option Explicit Dim var1 As String Dim var2 As String Dim first As String Dim second As String Dim sign As String ' on load Private Sub form_load() Form.Caption = "this calculator lab sucks." Me.lbDisplay.Caption = "" End Sub ' on clear Private Sub cmdClear_Click() Me.lbDisplay.Caption = "" var1 = "" var2 = "" End Sub.............
Excel 2007. At the bottom of a column of data I'm trying to reference the cell $AG4. There are 340 total columns. Each additional column to the right needs to reference the next cell in column AG. So I'm trying to drag and copy horizontally from $AG4 to $AG340. When I try just the single column it just copies $AG4 into everything to the right. When I have to columns ($AG4 and $AG5) and grab both to try to copy horizontally the numbers increasing it just does $AG4, $AG5, $AG4, $AG5, etc.
Is it possible to create a drop down menu where additional information can be added then tallied up in a separate table?
I would like to create a menu representing "tasks" where an amount of "time" can be designated per menu for my employees to select and fill. I would like this information to then be tallied elsewhere so I can keep track of our efficiency.
I've attached the excel file to give a better idea of what I'm trying to accomplish.
I have a worksheet in which i am asking a user to enter manually a number in cell E3. Suppose the user starts with 100, then the next time he is entering in E3 he shoudnt be able to enter 100 nor any number less than 100. I dont have a range for the numbers that the user is going to enter.Therefore countif function does not work. Is there any way that i an store the number taht the user enters first in cell E3 and then use that database to avoid the user from entering the same or a number lesser than that number.????
Excel 2003 - VBA - How do you detect when a row has been deleted in VBA? Better yet, how do you detect when a row is about to be deleted? I also would like to know the row number. I do not see an event handler that will inform me of the "Delete" event.
In the above example, I want to delete Row 1 and 3... it is an accounting issue, and when the values of the same contract match (50 and -50) then it needs to be deleted from the Excel sheet (whole row).
I am working on a large Audit project for one of my many bosses and I am a little stumped so I came to the experts. I have a list that is organized randomly and we need to have 95% of the cells deleted. I don't want to have to go through each time and calculate that out each time.
I am sure that I would have to find the last cell used in one of the columns and then multiply that by 95% and then delete from that row down in the sheet. (Since the sheet is already organized randomly it can delete the bottom 95% of rows.) I am not sure how to put it all together.
I have read several posts on this subject as well as the two common methods recommended by Dave. Hovever, I have not been able to incorporate the other thread recommendations to my specific problem. I want to delete entire rows based on the absence of a matching criteria from a list on another tab. Example: Tab1 contains a list of names in A1:A15. Tab2 contains rows of data wherein column C lists names that may or may not be in the list on Tab1. I want to delete rows that have a name in column C that does not match any of the names in the list on Tab1 A1:A15. Here is the code I have pieced together thus far:
Sub Delete_elimntd_players() Application. ScreenUpdating = False Sheets("QB").Select Range("C2").Select Do Until ActiveCell.Value = "" If ActiveCell.Value <> 'NEED CODE HERE' Then ActiveCell.EntireRow.Delete Else ActiveCell.Offset(1, 0).Select End If Loop Application.ScreenUpdating = True End Sub
I have been pulling my hair out for hours now trying to figure this out. I want is to figure out is how to compare an address in Column C to an Address in Column H, If they don't match I want excel to delete the row. I have 7500 rows to compare. I have read lots of posts and looked at the code for delete row conditional but I don't seem to be able to put it all together.
I have a workbook with particular worksheets that should never be deleted. If they are deleted by the user the workbook will become unusable.
The users need the freedom to edit data within the sheets (so protecting them is not an option), however, I need to restrict this freedom so that they cannot under any circumstance delete the sheet. Is there such code that I could use in the worksheet code to stop this?
I have a shared spreadsheet which contains only very simple "sum" formula's and I am trying to stop users accidently deleting them when they are inputting numbers.
I have tried using data validation, but that only stopped people overwriting the formula and not deleting them.
I also tried protecting the sheet, leaving only a cell range which users were allowed to edit, which worked... BUT I also have several rows which are grouped and when I protect the sheet, I cannot collapse and/or expand these groups.