Using Inputbox To Get Data From User To Be Used In IF Statement
Mar 25, 2014
I have found a base macro that has most of what I want the only problem is I need it to search column A by the data entered by the user in the inputbox and send out an email if it meets all the requirements. I also need it to be able to be able to do that search by only the first letter of the company name (example, only needing to put in A in the inputbox for Amber Inc.). If I remove the red text the macro works perfectly but just runs down the list on the spreadsheet.
Column A has company names, Column B has email address' and Column C has the company contacts first name.
[Code] .....
View 5 Replies
ADVERTISEMENT
Aug 1, 2008
I am using an inputbox to get a range a data from the user.
View 10 Replies
View Related
Jun 16, 2009
InputBox User Validation. Need to modify my code as follows?
View 5 Replies
View Related
Sep 18, 2009
I have not used Inputboxes or Userforms much. I have read through some of the messages here, but I need to learn more about them. I need to create some type of user interface, where the user would be asked to select between two choices. Based on the choice made, a macro would be executed. The two choices run different macros.
I need direction or an example of an Inputbox that shows two choices instead of a blank input space.
View 3 Replies
View Related
Jul 30, 2009
experienced coder (not VBA) and I'm having trouble with a simple statement. No idea why it was working before and moving it to it's own Sub screwed it all up.
Sub InitialMessage()
On Error GoTo BadEntry
SiteTotal = InputBox("Enter the number of approved sites *Must be an Integer > 0*")
BadEntry:
Entry = "Bad"
Msg = "An error occurred!" & vbNewLine
Msg = Msg & "Make sure you enter a valid value in all the prompted Message Boxes"
MsgBox Msg
View 9 Replies
View Related
Nov 8, 2007
i need an inputbox to appear asking the user to enter an amount(we'll call XX).
Now the code will find that value in Column F, and delete the row that contains the value XX in F
View 9 Replies
View Related
Aug 20, 2009
The example file gives a better visual explanation. Just want to copy a range of cells by pressing a command button. However I want the macro behind it to ask the user which set of rows to copy.
View 14 Replies
View Related
Oct 31, 2011
I need to force users to enter one of these words only (Year End) or (Qrt) using inputbox method.
Note that user must not leave the inputbox until he/she enter one of these words.
View 1 Replies
View Related
Jun 30, 2009
I have the inputbox so i can set a string value,
When the inputbox Cancle button is pressed i want to exit sub,
If the inputbox value is nothink and ok button, I want the msgbox displayed then goto newname.
If the inputbox has a value do >>>>>>That>>>>>
View 6 Replies
View Related
Mar 3, 2007
Is it possible to have an "if then" statement that would send the user to another page in the workbook? For instance..... =IF(D12="Mobile","Sheet2!","Sheet3!"). I know this does not work but is there another function that would do it? I am very new to vba and am sure it is easy there but I do not have a good handle on it yet.
View 5 Replies
View Related
Mar 7, 2014
I am trying to create the following function but I cannot seem to get it working correctly.
[Code] .....
View 3 Replies
View Related
Oct 2, 2008
I have a worksheet, attached, that is a supplier response to a purchase order. Column E contains the original qty ordered of each part number, Column H contains the original price. Now, I've created a quick macro, (in the workbook), that copies the original values to the confirmed values, and the formulas in columns G and J calculate the qty backordered, or flags the part as a price change.
After copying the original PO values to the confirmed values, the supplier would need to go in and make whatever changes are necessary. For example, we ordered 3 and they shipped 0 of a certain part, or the price has changed.
What I would like to do is create a macro that pops up an input box where the supplier enters the Keystone part number, (column A), then enters the new quantity or new price, and those items are automatically changed on the response form. I picture it in the form of 3 input boxes, in the first box the buyer enters a part number. A second box pops up asking if it's a qty change or price change. They would enter the value in a 3rd box, and that value would automatically be changed on the response.
View 5 Replies
View Related
May 16, 2008
I need to have an inputbox for users to enter multiple store numbers. What I need to do is actually filter out the store numbers that was entered into the inputbox
my code so far is:
'Inputbox to filter out new stores
Newstore = InputBox("Enter New Store Numbers seperated by a space", "Enter New Stores", "119 120")
x = Split(Newstore, " ")
For i = 0 To UBound(x)
Range("A1").CurrentRegion.AutoFilter Field:=2, Criteria1:=Array(x) _
, Operator:=xlFilterValues
Next i
View 9 Replies
View Related
May 31, 2006
I want to use the SaveAs function using the Inputbox results. The user will input a date like 5-30-06. Then I want save the workbook as "WE5-30-06.xls". I can't figure out how to do this b/c it wants to use 5/30/06 which isn't allwoed in naming conventions. BTW the inputbox name is dWeekend.
View 2 Replies
View Related
Feb 9, 2010
I have a user form that has a combo box "City" two text boxes one called "Flight" and the other "Date". What I'm trying to do is to prevent the user from saving the data input from the user form if any of those three fields is left blank. The code that I have so far checks all of the required fields, if any are left blank a message notifys which field(s) is left blank and return the focus back to that field. But the rest of code also fires.
What I really need is either to stop the code if any fields are blank and return the focus back to the blank field, the user completes the field(s) and clicks the save again, or better yet, pause the code until all the required fields are completed and then complete the save. (There is actually another 200+ lines of code in this sub, but I deleted it to keep the post a little shorter.)
View 2 Replies
View Related
Jul 18, 2009
Here is my delimma. I am using the standard InputBox for my users to input the number of errors found for each category in a record from a daily report. The problem I having is that every time the user types in data using the InputBox it overwrites the previous days numbers. I need to set up the InputBox code so that after the user has input the numbers for that day that the next time the InputBox is used it selects the next column to the right and continues to do this for each day.
View 4 Replies
View Related
Oct 25, 2012
I have an month input in cells B2 (user can enter values from 1-5)
I then have a data table that has month 1,2,3,4,5 running across range G9:K9. the data is held in range G10:K19.
So if user types in 4 in B2, what should happen is that months 1,2,3 and 4 the data for these months should be cleared and data in month 5 moves forward into month 1.
So basically, anything left of the month entered is B2 should be cleared and replaced with anything right of the month in B2.
1
2
3
4
5
£11
£133
£29
£193
£100
[Code] ........
View 3 Replies
View Related
Oct 27, 2009
I am trying to learn the concepts, then apply them to a set of actual worksheets. I am trying to use named ranges from one worksheet in another worksheet. The named ranges need to expand. Although I can get the add data to a dummy worksheet to work within the same worksheet and I can even get a named range to work in the foreign sheet.
My problem is, when I can end up adding the additional data to the named range, it will only add one name. I have a number of named ranges that are referenced on various worksheets. The idea is, certain named ranges should be able to expand so I donft have to type them all in. (There could be hundreds of manufacturers or models.) I would also like them to be able to sort themselves after additional names are added to the named ranges. I would also like them to auto populate as well. I am using Excel 2003 SP3 (11.8307.8221). I have enclosed the file. Drop down lists (named ranges) are on the worksheet called DROP DOWN LISTS (LOCKED) **ITfS NOT CURRENTLY LOCKED**.
The data validation issues are on the worksheet called Rev7.0 Wood (Basic Sheet.) There are other instances to use these, but I hope to learn to do them myself on the other worksheets. Of particular interest is Column f.................
View 3 Replies
View Related
Jul 28, 2009
I am currently using an Intersect statement in a worksheet module to perform two things:
1. Insert a time stamp into row 2 when row 1 has a price inserted
2.To clear that time stamp if the price is deleted at some later date.
My problem is with the time stamp value being deleted by the user.
If I try to clear the price (now that the time cell =empty) I get a Runtime error 91 - Object Variable or With block variable not set.
I would like to convert this code to a select case statement but I'm not sure how to do this in this situation. Would error coding be appropriate in this instance?
View 5 Replies
View Related
Aug 27, 2007
I need to be able to give a grade A, B, C or a D by using a range of scores in an IF function for a markbook as part of my IT coursework.
I have had several failed attempts, and this is one of my many formulas that has failed:
=IF(O6<45,"D",IF(O6=$46:$60,"C",IF(O6<$61:$74,"B",IF(O6>75,"A"))))
View 9 Replies
View Related
Aug 7, 2009
I have a simple work book. Please refer to the attachment Book1.xls.
In B1, the data is limited (by Data Validation with a drop down List) to Yes and No.
I need to limit the range of data in D1 as, If B1 = Yes , then the value of D1 could be entered More or Equal to 51 ; and if B1 = No then the data entered into D1 should be Less than or Equals to 50
I prefer to do it with Data Validation.
View 7 Replies
View Related
Nov 12, 2009
I am trying to create a data validation rule that only allows a neagtive value to be entered if the word "backcharge" appears in an adjacent cell. So far I have come up with = if(d2="backcharge",<=0, .... But I am not sure how to finish it off.
View 4 Replies
View Related
Jan 30, 2014
I need a simple IF statement that look up in Column C for any text, and then add the value from Combobox "txtfloors" to Column B .
View 1 Replies
View Related
Jun 1, 2009
How do I write an if statement where if the value from a cell (mtunit!A1) exists in a row from another worksheet (sqllist!A:A) then return the value of the of the next cell(sqllist!B2) from the row where it exists, else leave it blank.
View 7 Replies
View Related
Apr 26, 2013
Can you use data validation as part of an IF statement?
Example - I want a cell in column B to check a cell in column A. If the cell in A has "No" entered, B will show "Yes". If there is anything else in A then the user can choose from a dropdown in column B.
View 5 Replies
View Related
Oct 26, 2009
I have a statement that runs to check for empty cells but i want it to only run when cells in column A contain data and this can change from time to time.
Eg sometimes column A will contain 10 items, sometimes more sometimes less, sometimes none.
Need a statement that will only run my statement when these cells contain data.
View 9 Replies
View Related
Sep 29, 2011
I have a cell containing data validation list and what i want to do is that when i choose the 1st value from this list .. a number (for examole 1) appears in another blank cell .. and if i choose the 2nd value from the list .. another number (let's say 2) appears in the blank cell.
So how to use the if statement in a cell that contains a data validation ?!!
View 7 Replies
View Related
Nov 14, 2012
I have a cell (A2) containing a data validation list and i want to make it blank if another cell (A1) is blank .. else if (A1) is not blank then view the list in (A2)Is that possible ?
View 3 Replies
View Related
May 6, 2007
I have a spreadsheet using drop-down boxes with data from a data sheet.
What i need to do is, if 'A' is selected in "A3", then in "B3" i want a drop-down box to select "A only" compatible values, whereas if 'B' is selected in "A3" then i want "B only" compatible values to be used in "B3" list box/drop-down box.
E.g. if "A3" is 'select transport' then if the value in A3 chosen is "Car" then i only want "4 [x] wheels" in drop-down "B3" cell.
View 9 Replies
View Related
Jul 11, 2012
I have an excel file with multiple sheets. I want my HR team to update that file, but one user shouldnt see the entries of other users. I want to make a consolidated file out of three files. This excel template is for salary input.
View 3 Replies
View Related