Force Users To Choose One Of Items And Not Allow Blank Entry To Be Entered
Dec 14, 2011
I have a list box in a user form using R2:R3 as Row source.
I need to force the users to choose one of the items and not allow a blank entry to be entered.
I used the code below for the entries however it still allows for a blank to be entered into the Cell.
This part of the code works for Me.sapor = "" Or Me.jobna = "" Or Me.ordernu = "" But not for the next (2) list boxes it allows blanks Or Me.snd = "" Or Me.mcode = ""
Me.Snd and Me.mcode are list boxes.
Code:
If Me.sapor = "" Or Me.jobna = "" Or Me.ordernu = "" Or Me.snd = "" Or Me.mcode = "" MsgBox ("Feilds SAP Number, Job Name, Price, Code and Month Code Must be Completed")
Exit Sub
Code:
Private Sub CommandButton1_Click()
Dim rNextCl As Range
' Row count = where the select cell finishes and window box moves to rows over
' offset = howmany cells up or down from the row count
[Code]....
View 2 Replies
ADVERTISEMENT
Dec 29, 2006
I have two columns, Account Number and Account Type. I already use Data Validation on Account Number to make sure it is numeric and on Account Type to make sure the user picks from a drop-down list. I want it so that if a user inputs an account number, it forces the user to automatically pick from the drop-down menu in the account type column, otherwise post an error.
View 3 Replies
View Related
Feb 13, 2009
I have two CHECK BOXES, one says YES and the other says NO
directly after the user opens the worksheet and enables the macros
I want a pop up message box to appear directing them to check YES or NO and not allow them to do anything else until one of the two is checked
once either box is checked, they can continue on to filling in the rest of the worksheet
View 9 Replies
View Related
Aug 6, 2007
I have a sheet which is protected but people are still able to change cell formats etc if they use the standard paste method. I want people to be able to paste data in but it forces paste special values to stop people pasting formats etc over already formatted and locked cells.
I know I could write a macro and run it using the shortcut keys ctrl-v but then the users lose the ability to undo if they make a mistake.
Is there a way to force paste special or allow users to run a macro but be able to do undo if they make a mistake?
View 9 Replies
View Related
Sep 12, 2009
I have a spreadsheet that has a button named Exit Requisition Program on it to close the application with. When the button is used everything is wonderful. All of the data on the sheet is saved and the application closes. I have a problem with some users clicking the red X without saving changes and that creates a big problem.
What I need to do is any one of several things.
1. Remove the red X completely.
2. Deactivate the red X.
3. Have a message box pop up instructing the user to use the Exit Button when the red X is used. Any one of the three methods listed above would work for me.
View 2 Replies
View Related
Apr 11, 2014
Is there a simpler formula I can use that combines IF and COUNT functions. CountIf, maybe?
I have, let's say, 17 items and I want to choose 5 items out of them. Each time I pick one I am told how many I have chosen. When I reach 5, I am told that I have chosen too many.
View 2 Replies
View Related
May 30, 2008
I have an Excel sheet which serves as an input form. I would like to set something up where if the user inputs any value into the cell range B12:B100 then they are forced to also enter a value in column J of that same row.
Maybe something could be done where if they enter a value in B12, then they cannot enter a value in B13 before entering a value in cell J12?
View 9 Replies
View Related
Jan 16, 2009
I have a spreadsheet in which has many different cells that need to be completed if another cell has data.
Examples
If the user inputs a name into A3, they must complete cells B3 thru D3. Cells B3:D3 contain different entry methods including a drop down list.
On the same sheet, if the user chooses GTD from a drop down list in cell U3, cells BA:BJ must be completed. And if they choose GCI from the drop down list in U3, they must complete cells BK:BR
View 9 Replies
View Related
Dec 30, 2007
I want to change data through a user form and disable users from going around my form. I want users to see the underlying spreadsheet as the form manipulates data.
If I enable a form in Modal mode users can bypass the form. If I use it without modal form I can't change data from my form. I seem to be in a catch 22.
View 5 Replies
View Related
Mar 20, 2008
I'm designing a spreadsheet for users to enter the length of journeys that they've claimed on their expenses. In order to ensure consistency between users, I want to add two drop-down boxes or listboxes that will offer a list of common locations (eg. office A, office B, office C, customer A): one for the start point, and one for the finish point. These will be referenced by a lookup table that will automatically fill in the journey distance.
However, users will also need to be able to input other locations themselves (ie. if a journey starts at home, not at the office). If I use data validation to create the drop-down box, it will only allow the values on the list; is there something that functions like validation in offering the user a range of options, but also allows other values?
View 4 Replies
View Related
Jun 30, 2008
I am using Control Tool box combobox in worksheet.How to change the Combobox to Non Editable combobox?
View 3 Replies
View Related
Mar 12, 2009
I want to restrict the value entered on a sales sheet to force the value to be over 15% margin. In column M you enter a value in column N it report the margin. I want to force the value in M to give a minimum 15% in column N or report an error.
View 3 Replies
View Related
Feb 9, 2007
I have a spreadsheet that I add to daily with 3 Columns that are always the same. Name, ID number and Phone Number.
Is there a way to make it so that when other people in my department use this that no matter how they enter the name, it is always formatted the same. No matter they enter the ID number and phone number they are always formatted the same. I've tried some variations of data validation but couldn't get to where I need to be.
Attached is a simple example.
I'd like the name to always be formatted as Smith, Bob
I'd like the ID Number to always be formatted as xxx xx xxx
I'd like the Phone Number to always be formatted as xxx xxx xxxx
View 9 Replies
View Related
Feb 16, 2007
Below is the existing code that I'm working with and would like to be able to make the ' name' column either Upper or Proper case on entry. I haven't decided which I'm going to use yet.
Set r = Sheet1.Range("A2:C65536")
If Not Intersect(Target, r) Is Nothing Then
sTgt = Trim(Target.Value)
If sTgt = "" Then Exit Sub
Select Case Target.Column
Case NmCol
If InStr(sTgt, ",") = 0 Then
iSpc = InStrRev(sTgt, " ")
Target.Value = Mid(sTgt, iSpc + 1) & ", " & Left(sTgt, iSpc - 1)
End If
View 3 Replies
View Related
Sep 5, 2007
A form loads and the first thing the user is to do is enter a specific date in a text box (preferably in, "mm/dd/yyyy" format.)
Is there any way to set up the text box so that when the form loads, the, "/"'s (slashes) are already in place? And can I set it up so that if the user enters in the date in any other manner aside from, "mm/dd/yyyy", that it will give them an error?
Finally, I want the user's date input to store on a worksheet (in row, "G".) So the first time the user uses the form, they type in a date and it stores the date in the FIRST AVAILABLE CELL IN ROW, "G." (example: "G1") The next time they use the form and type in a date, it is to store in, "G2", then in, "G3", ect. Each time they fill out the form, the new entry is to save in the next row beneath the previous entry.....
For other text boxes and combo boxes I have been using the following code to do this:
Sheets("Sheet1").Range("A" & intRow) = Text.Value (or Combobox.Value - depending on whether it was a text box or a combo box.)
Unfortunately I have NO idea how to apply this logic in regards to text boxes that are to store dates.
View 9 Replies
View Related
Dec 30, 2007
I found the following code which works fine until I start to select multiple cells in cell B for deletion etc. At this point it throws up a run-time error 13 type mismatch, which will cause problems when other people start to use the spreadsheet.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column <> 2 Then Exit Sub
If Target.Offset(0, -1) = "" Then
Target.Select
Application.EnableEvents = False
Target = ""
Application.EnableEvents = True
MsgBox ("You must enter Atlas Part No. first")
End If
End Sub
View 2 Replies
View Related
Jul 31, 2008
I need to force our salespeople to enter information in a cell based on a condition. This is the condition: If I5=3, then I need to move the user to cell I3 with a message that says "Enter miles to site" -- I don't want them to be able to move from the cell until they enter the information. If I5 does not equal 3, then I don't need anything to occur. I need to apply this code to four separate worksheets in the same workbook. Also, they will be entering a number in cell I3, so is okay to leave I3 formatted for Number or General Number? Note: This question is also posted at the following link, but has not yet been answered by that group: http://database.ittoolbox.com/groups...dition-2270643.
View 2 Replies
View Related
Jan 4, 2009
I am in need of a macro that will allow users to delete an entry in a named range as well as delete a range named the same. I would like the macro to open a list showing the contents of a range named "Locations". Once opened the users may select a name from the list and click on a button to remove that item from the named range. the macro can then delete the cell that name is in and shift the remaining cells up, changing the range. Second the macro should delete a named range that matches the one the user selects. once delete I would like to have a pop say "Location Removed Sucessfully".
View 9 Replies
View Related
Jun 22, 2012
I have a pivot table which I want to force the all of the pivot table items to be selected for a particular pivot table field. One would think that this would be as easy as unlocking all cells on the sheet with the exception of this pivot field and then locking the worksheet. This doesn't work though as I am generating multiple pivot tables on the same workbook for the same range and I get this message: "this command cannot be performed while a protected sheet contains another PivotTable report based on the same data source...".
My thinking is that I can do something along the lines of this:
Private Sub Worksheet_PivotTableUpdate(ByVal Target As PivotTable)
Dim oPI As PivotItem
Application.ScreenUpdating = False
If Target.PivotFields("Item Sold").PivotItems.Count Target.PivotFields("Item Sold").VisibleItems.Count Then
[Code]..
This is failing right away though on the If Target.Pivot.... line.
View 1 Replies
View Related
Mar 25, 2009
I am making a spreadsheet that allows users to select items from a validated data list. Each item in the list has a numeric value in an adjacent column. When the user is entering data they will select from a drop down of the data list in column "A" and I would like to have the numeric value that corresponds with their selection to then autofill in column "B". I have tried VLOOKUP and IF formulas but cannot seem to get anything to work.
View 9 Replies
View Related
Jul 30, 2009
We're trying to use one template to enter data with users being able to start entry from a number of different starting points. this changes they way the look-ups have to work. The attached sample explains it a whole lot better.
View 2 Replies
View Related
May 27, 2014
I have been using Excel for several years and I'm fairly proficient at its basic functionality. I've recently learned and made extensive use of pivot tables. However, I have not taken advantage of such features as Data Validation, VBA, etc.
View 3 Replies
View Related
Feb 16, 2010
Is there a way to save items into memory to be recalled in userforms.
Let's assume that I have a userform called UserForm1 and three textboxes named TextBox1, TextBox2 and TextBox3.
View 9 Replies
View Related
Jan 3, 2013
I have created a userform with 3 text boxes. It also has three buttons - clear, Cancel and Generate record button.
User form takes entries in the three text boxes and on clicking the Generate Record button, the values of the three Text Boxes are inserted in Column A, B and C of sheet1. The columns keep on populating with new data on each submit in the row below the last record.
Now it is required to enter data only if the value entered in TextBox1 is new and has not been entered previously in column A. If textbox entry is already aviailable in column A, a message box of 'Record available' shoud be prompted and the text entry must not be allowed until the data entered in TextBox1 is not unique.
View 3 Replies
View Related
Aug 21, 2007
I've been searching but I can't find an answer that fits. Here's the closest I've come. Force Date Entry on Particular Condition. What I need is if A10 has any data in it then I want a box to pop up that instructs the user to input data into B10 they click OK and then enter the data. Once the user inputs data into B10 then the error should be cleared. If they don't enter data then the error should keep coming back.
View 3 Replies
View Related
Jun 19, 2009
I have this formula in a cell:
=IF(AND($D4=H4,$F4=I4),3,IF(SIGN($D4-$F4)=SIGN(H4-I4),1,0))
but i need to somehow incorporate a formula that only shows this if a cell has a value present.
I know as an example its something like:
=IF(C2="","",C3)
but i dont know how that would go in my existing formula as i dont know how to stack IF statements?? (a very kind person on this forum did the original formula btw)
the cell that i need to have as the 'blank or not' is D4.
View 3 Replies
View Related
Feb 12, 2010
I need a formula that will do the following:
Sum K4 (unit price) and M4 (shipping) and return the answer in N4 (total), if K4 and M4 are empty then leave cell N4 blank
All responses will be welcome as this has been driving me mad for over an hour, and the answer is probably so simple!
View 9 Replies
View Related
Jun 7, 2013
Cell D39 has the formula
=(D4+D11+D18+D25+D32)/5
I want the cell to remain blank until at least on variable is entered, but then I want it to calculate the average of only the cells that have a variable in them.
Just so I am clear
D4 = 20
D11 = 50
D 18 = BLANK
D25 = BLANK
D32 = BLANK
Average would be 35
View 4 Replies
View Related
Feb 17, 2010
Amount Amount Item Total Account
$ -
No Profit$ 629.50 $ - $ 629.50 No Profit$ 46.29 $ - $ 46.29 No Profit$ 2,333.01 $ 233.30 $ 2,566.31 233.3
$ -
No Profit
$ -
No Profit
$ -
No Profit
$ -
No Profit
#1 If there is an amount in column B, I want column D to reflect that amount.
#2 If there is no amount in column B, I want column D to state the words "No Profit."
#3 Already in column B is the formula =C1-A1.
I tried =IF(B1=0,"No Profit",B1) but when I copy that formula down the spreadsheet, it inserts "No Profit" into all of column D. I only want "No Profit" to exist when there is a $0 resulting from the formula mentioned in point #3. When there is a blank cell in column D, I want it to remain blank until an amount is entered in that row?
View 9 Replies
View Related
Jun 10, 2009
i have two date fields....one date requested eg 02/06/09 (cell C10)...another date completed eg 03/06/09 (cell R10)
a third field (cell S10) contains the formula: =IF(R10-C10=0,"less than a day",R10-C10)
so if a request was actioned on the day then it shows as less than a day, otherwise will show how many days it took
but when this formula is draggeddown all other cells show - less than a day
how can i make these cells blank whilst still holding the formula?
also - is there a quick formula to add to show only the amount of wrking days a request took to complete?
View 7 Replies
View Related