I have a macro that runs and toward the end I want to have a message box that will enable the entry of a number that will go in cell N1. The reason for this is that I run the macro on a large number of clients and if they owe a certain amount they are put onto the list. One month we may want to look at those over 2000, and another over 1000. I then have a formula that will delete out the rows that are below those numbers. Also if there was a cancel button to stop the process at this point that would be very cool as well so we could look at all that owe.
I am not sure how easy or hard this is to do. I have another work around that ends my macro at this step and I enter the number in N1 that we are looking for and then run the rest of the steps in another macro. The results have worked with this I just want to make it work faster.
I am trying to create a macro which gives me an input box. I need to enter 2 numbers into the input box. It would be as follows:
Input Box Msg 1 - "What is your labor cost?" (NUM1) Input Box Msg 2 - "What is your productivity rate?" (NUM2)
Then I need the macro to take this info and enter it into a formula which changes according to the row which you are on. (I need the macro to work based on which ever cell I currently have selected). The formula would be this if I currently had a cell on row 10 selected:
=(NUM1*(NUM2*$H10))/$H10
So, if I currently had cell L10 selected, and I ran the macro and put 100 in for "NUM1" and 10 for "NUM2" and my sheet had 20 in cell H10, then the macro would enter the number 1,000 into cell L10. If I had L500 selected, then the macro would enter the final number into cell L500 based on what value H500 contained.
I am just starting to get my feet a little damp with VBA and I am trying to make a macro that will act whenever any text is entered in any cell within a 3x3 square. Whenever any text is entered in any of those cells I would like it to enter a text ( "X" ) in a cell which is specified by a cell in the spreadsheet (this cell will output which cell the macro should write the text in in this format "A:1" or "C:3"). How can I make the program act only in reaction to the user entering thier text, and also, how can I get the macro to read A:1 and enter the text into that specific cell? Any help would be so awesome, the book I have is really difficult to navigate.
I am in need of VBA code so that I can fill out an input form generated by someone elses macro input box. (I am the user, not the one developing the input box).
I am working to streamline a whole cluster of macros and this input box is currently my bottleneck. When the input box pops up, instead of me manually typing, I want to autofill the space with "104" and then click 'ok' uisng VBA.
I can not modify the actual VBA that created the input box (ie make 104 the default) because other users need the box to be blank.
find out how a developer would change the original vba code, not how a user can interact with an input box by using vba.
I want to create an input box that will allow you to input the column number it should start in... so instead of it being fixed at A, you can choose column B, C, D all the way to the end if you like.
Sub SplitSheetsNoDelete1() Application.ScreenUpdating = False Application.DisplayAlerts = False Dim Lmainsheet As String Dim Lrow As Integer Dim lcontinue As Boolean
Dim LColamaster As String Dim lcolatest As String
'Retrieve name of sheet that contains the data Lmainsheet = ActiveSheet.Name
I am maintaining a program which reads through a pre-prepared CSV file using Input #.
The first line of the CSV file contains field names, one of which has recently been changed from "Protection Type" to "1st Protection Type". For some reason VBA simply returns the number 1 instead of the full string.
I find this strange, since within the subsequent data lines there are many alphanumeric fields which begin with numbers and they are all read correctly.
Before I start making wholesale changes to the software (plan is to either use Line Input # and parse each line manually, or import the entire CSV file and move the data using an array) does anyone know if there is a way around this behaviour?
i am in charge of making an assignment list in my classroom .
cells A1 all the way to A20 have a single childs name in them.
in the corresponding box ,B1 which is next to the first name and B2 next to name 2 , etc etc. i would like to put 3 random chores they need to do for the week. the first chore being in column B the second chore in C and thirs chore in D . in other words, each child listed in column A , 1-20 will have 3 chores to do over the week .
all 3 chores for each child will be in the same numbered row as their name.
i have a list of all the chores at the bottom of the spreadsheet, theyre from A20 to A40 (20 chores in a row) . i want excel to randomly put A20-A40 in the corresponding boxes next to the kids names.
im tired of having to mix all their chores up for the week next to their names.
Below is a message box with an input bar inside the message box. I am able to put a prompt message on top of the input bar but i am finding it difficult to enter another message underneath the box. I want to have the text "Continue?".
[Code] ......
This is what the promt message with the input box looks like : Untitled.png
So basically right underneath the input bar i would like to have the word "Continue?"
an input box I have created. Users are required to enter dates in the box which will then send the date to a specific cell in the sheet. The problem I am having is that if someone enters a date such as 08/07/2006, it is being converted to 07/08/2006 when transferred to the cell. Does anyone know any way around this? Here is a sample of the code I am using:
I have an input box that request the user to enter a vlue between 1 and 6, and uses the answer to multiply another range of cells.
Now I'm not sure how to add a couple of other features. I would like to: 1. Loop the input box until an acceptable answer is given, (numeric, between 1 and 6), with a message box prompt that says "Try Again". 2. Exit the macro if the user hits "Esc".
I am trying to create a macro to import a print file and a despatch file into excel so i can format the data. Each files has a date in the file name so i am using an input box for the user to define the file to be imported. My problem is that the user has to enter the date for each file, is there anyway for the user to only enter the date once and it apply to both files, the code i have so far is
What I want to be able to do is set up a thing that when you're in the excel sheet you click on it. Up comes a box where you can enter data and when you click submit. It puts that data back into excel spreadsheet. I have attached a spreadsheet to show what I mean. I have deleted some stuff that are unnecessary so don't worry about them.
What I need is for you to click a button that will create a new row/copy into the next row, from A9-AH9. Then the button will automatically bring up a box that will ask for Time, Timber, Clay, Iron, Warehouse, Hiding Place and then will enter that data into there respective cells which would be D20, F20, I20, L20, O20, Q20 respectively. That is the main idea. maybe it would be better to have te button come up with a box asking for the information and then will create the row and insert the data. If it's easier you can just do the box with just time or something so it's easier. I can then do the rest.
Tyvm. This to me seems really complicated so not sure how you would do this at all. i've looked at other stuff on the internet but haven't gotten anywhere.
P.S. If you have a more generic thing similar to this then show me the code for that or upload it and I can change it too suite my needs.
I am an absolute beginner to Excel programming and new to this forum. After I have been reading some basics I think this is absolutely the right place to learn
What I am trying to do i to use a userform for input in list. Should be simple, but I can't figure it out
Attached there is a sheet that I set up. The sheet called "Source" contains some data that is used as a picklist in the input form. I created a user form called "Newflight" with comboboxes in which you can input plane type, pilot and passenger based on the data in the Source sheet. It also contains an input box for the take off time. (it would be very nice if I the actual time could be entered by a single click, but the user should still be able to enter it manually). After clicking "STORE" the data should be stored in the first empty row in the sheet called "List".
formula for input values.I need to put in table_1 every to each fourth row each first row from table_2.
For example:
in table_1 A1 input A1 from table_2 in table_1 A5 input A2 from table_2 in table_1 A9 input A3 from table_2 in table_1 A13 input A4 from table_2 And so on.
I'm trying to write a macro that will not allow a number to be zero. I have a macro that references a cell that if it is input to zero will create a loop that goes on forever. The thing is this cell will never have to be zero, so is there a way that I can write a macro that if this cell is zero, it gets reset to its previous value?
Dim message, title, defaultValue As String Dim myValue As Object ' Set prompt. message = "Enter a value between 1 and 3" ' Set title. title = "InputBox Demo" defaultValue = "1" ' Set default value.
[code].....
I'm also trying to build a macro where I input the cell that I want selected and Excel selects that cell. This is what I came up with.
Code: Dim s As String Dim i As Range s = inputbox("where?") If s = i Then Range("i").Select Else: Exit Sub End If
I currently have a vba that when execute, a message box pops up that allows me to name the tab. I'd like to add a line that closes the input box when I press the red ex or when I press cancel. Currently, when I press cancel, another annoying box pops up but ultimately there is no way to close out once it starts. What line should I add to close it when pressing cancel or the red ex and where should I add it? find the code below:
i have a spreadsheet model that i have inherited that needs some rigour. currently, users are inputting the bare minimum and then running away with calculation errors all over the page. I want to be able to "force" them to fill in certain fields before allowing them to move on. Eventually, I will do this via a User Form but until then, I need something to help my lovely users along in the right direction.
So, if a user inputs a project name (say G15), they will have to also enter Project Type (I15) and Start Date (K15).
while I am here, I want to be able to have the Project Status show as Potential if the Start Date is in the future. I already have validation set to limit the user choices to "Current,Completed,Suspended,Potential,Cancelled". I am not sure how to get the validation list to be contingent on the start date.
and lastly, does anybody have a little piece of code that will make the Start Date show as the day that the Project Status was changed to Current? So, even if the Start Date was initially a few weeks away, if Status is changed to Current tomorrow, the Start Date should be overwritten with tomorrows date.
I don't know if input boxes are what I want but you'll be able to tell me
When Excel is opened, I want a box to pop up where the following can be pasted: "Trades Merchandise: 100,000.000 Merchandise: 1,000,000.0000 Merchandise: 1,000.0000 Merchandise: 10,000.0000 Total: 1,111,000.0000"
The text and numbers will be copied from a webpage. When Excel is then opened, rather than having to type in those values (I'm only interested in the numbers), could an input box (or something else) handle and filter those lines to basically just the numbers?
I have a percentage based calculation I'm using to estimate monthly expenditures and such.
Say I have a Total Sales Dollars in cell A1
Now I have my total expenditure dollars in cell B1
In cell C1 I have the percentage of what my total expenditures are vs my Sales dollars (B1/A1)
What I would like to be able to do is either be able to enter in the Expenditure Dollars (B1) or the Expenditure % (C1) and have it calculate the other field.
For instance if I enter a value in B1 it will give me C1, or I can enter a value in C1 and give it a value in B1.
Is it possible to just use these two cells with formulas or maybe a CF??
Not sure if it's late in the day, but my mind is drawing a blank on this.
I want the user to press a button on the spreadsheet and this should then result in a popup box appearing on the screen asking the user one question ie "what is the current rate"
The user will then enter for example 20%. I then want to transfer this number to cell A1 on sheet 1.
I've not used Input Box function before. When a user opens my workbook I want to check whether a named range ("Name") is blank and, if it is, to prompt the user to type their name in an Input Box which then returns that value to the named range. This is what I have tried but I don't think I am referring to the named range correctly,
Dim strName If IsNull("Name") Then strName = InputBox("Please enter your name", "Name Required", "1") Range("Name") = strName End If
I have an excel file with several rows of data in it, and have a macro currently written to fill out a blank form from the information in a given row. I was wondering if there is a way to prompt the user to input which row you want the data to be pulled from.
For example:
Which row to input data from? - 4
Then have the macro run, pulling the data from the cells in row 4, rather than row 2, which is how I have written it to begin with.
I didnt write the code from scratch, I just used the record function and it traced my actions, and does what I want it to do, but only for the data in row 2...and I want to be able to specify which row to pull data from.
I have textboxes on a user form. If I hover my mouse over the textbox and place a value and then move my cursor to the next text box. The number in the previous textbox remains (but it is not transferred to the destination or target cell in my worksheet. The only time it is accepted is if you either hit enter or tab.
How can the value be accepted if I place the value in the textbox and move my cursor to the textbox. Can it be programmed to accept that value as it would for an input that has been entered by tabbing or hitting "enter".
I have taken over a workbook that due to various constraints elsewhere I cannot change the structure.
Each of the three columns in question C, E & F have dropdown validation lists.
Column C is either Import or Export Column E is a list of locations where work is Imported From Column F is a list of locations where work is Exported To.
Based on whatever choice is made in column C either Import or Export I only want the user to be able to select a value in E or F.
So if Import is selected then a value cannot be entered in F