VBA Code For InputBox With Multiple Inputs
Apr 7, 2014
I am trying to create a vba using only one macro button (excel). I would like for them to enter their names and have their own password that will then insert their signature(pic.jpg) in a specific cell.
I created a certificate in excel and I don't want 12 (number of people) buttons visible. Id rather have a long code. Im not sure if using If and Then and ElseIf is the way to go.
View 8 Replies
ADVERTISEMENT
Mar 18, 2013
I maintain the data flow at my work. We send and receive the data using excel files with specific formatting that I then upload to the database. Each time I send or receive the excel file I must log them, this is what my code question refers to.
I use RDBMerge to merge all the contents of the 100 plus excel files into one worksheet. The first part of the macro cleans up the merge data for use in the log (i have attached an example of the clean data and finished log).
The blue shaded area of the "Raw_Data" is what the clean data looks like, the yellow column is what current macro records for each record.
As you can see by the example the Raw_Data is only two files LL_LLL_BOB_ToLLLLL_20121228_01 & LL_LLL_BOB_ToLLLLL_20121230_01, each with more that one record.
The log code in column "H" Is based on this criteria:
First Letter of the Unique ID in column "E" - O, M, or L
Program Type in Column "F" - U or R
1. O-U = U
2. O-R = RU
3. M-U = U2
4. M-R = R2U
5. L-R = R
You will note that Columns G-R of the "Log Sheet" correspond to the "Record Type" found in Column "G" of the "Raw_Data" sheet.
This is the area where my skill at using scripting dictionaries fails.
The results for the log list each file only once, but the log code for each corresponding "Record Type" in columns G-R of the "Log Sheet" must contain each unique instance of the code. In other words
if LL_LLL_BOB_ToLLLLL_20121228_01 contains an O-U with an "A" Record Type and an M-R with an "A" Record Type; then, on the log sheet there needs to be the codes "U/R2U" in the cell intersection of the LL_LLL_BOB_ToLLLLL_20121228_01 record row and "A" column (which is column "G")
So, If the File contains one of each code for each Record Type the corresponding cell must house one of each code separated by a "/" without any spaces. This means the cell value could no code, or one code and all the variations in between to all five codes. Also, for ease of human reading the log codes should be concatenated in the 1-5 order that I listed them in (U/RU/U2/R2U/R)
Here is my code so far.
VB:
Option Explicit
Sub test()
Dim dic As Object, a, i As Long, rng As Range, e, w, n As Long
Set dic = CreateObject("Scripting.Dictionary")
[Code].....
View 1 Replies
View Related
Feb 19, 2009
I am trying to set up a "diet log" for my nephew to track his eating habits for a school project. I am trying to make the "total" section of the attached spread sheet auto calculating depending on the information placed in the "breakfast / lunch / dinner / snack" catagories. I have two worksheets in the file. The first being the preferred method of a single cell and seperating the items using only a ",". The second sheet has a little bit different lay out which I don't think will work as nicely.
Honestly, I am not sure if this will even be possible, but I figured I would try here as a final resort. Currently there are just some sample foods in there as I will let him fill in the actual workbook for his use.
View 7 Replies
View Related
Aug 19, 2009
I have a spreadsheet with a medium-sized data set, and I need to look up values from the large table, and thin the table down to only the relevant values.
To arrive at each unique value, I will have to match 3 input cells to the first 3 cells of the data table, then copy values from across that specific line to the appropriate cells of my smaller table. I really don't need to sum or do any math in this step, its just a copy from the master table to the smaller table, the math will come later.
I think I'm attaching the file (remember-first post) so hopefully it will help with what I'm trying to accomplish. Hopefully this isn't a big deal, but I've been pulling my hair out on this all day and I just can't find a solution anywhere that really matches up to this.
View 6 Replies
View Related
Dec 26, 2006
I have a spreadsheet with over 70 worksheets. The majority of these are concerned with Work standards (National Occupational Standards), each of these standards are further broken down into performance criteria.
What I would like to happen is for a person to be able to enter a "Yes" or "No" response in a box to a specific question on an assessment report or a witness testimony worksheet. If a Yes is entered I would like the spreadsheet to automatically enter a reference i.e AR1 or WT2 (stated by the inputter on that worksheet) in each of the other seperate worksheets that cover this perfromance criteria with this reference.
Because many of the worksheets contain similar performance criteria, i.e "treating people fairly and with respect". The answer of "Yes" on the assessment report worksheet may require a reference inputting on anything up to 60 different worksheets. Is this possible or am I dreaming of the impossible?
I really should have asked this question before I wrote out all the seperate worksheets.
View 14 Replies
View Related
Jun 2, 2008
I am looking to create an excel search with two input and three output values on Sheet 1 that will link to a table on Sheet 2. To help illustrate:
Sheet 1:
The two white cells indicate the two input values, and the three blue cells indicate the three desired output values.
Sheet 2:
I want to enter the two input values (Length and Width), press the "Search" button, and have the corresponding output values (DWG#, Item #, and Tooling #) from Sheet 2 appear in the three output cells on Sheet 1.
View 9 Replies
View Related
May 14, 2014
I am looking to take the data off of a "detail" sheet and put it to a summary page. I want the summary page to find the capital and expense from "details" sheet by the month on the "details" sheet. Then for every month add all the expenses and capital and put as 2 values per month, Capital and expense, on the summary page. I am not really sure where to begin but have added my excel workbook that I have started.
View 2 Replies
View Related
Feb 19, 2013
I'm working on a fairly complex spreadsheet where I want to pull conditional formatting into an entire row. I have a column in tab1 where I have a bunch of beer styles listed. On tab2, I have a 2 columns: a complete list of styles with a 'yes' or 'no' in the next column based on certain criteria. What I'd like to do is have the column in tab1 highlight if that style in tab2 has a 'no' in the column next to it.
View 3 Replies
View Related
Sep 17, 2013
I have several formulas that I use over and over, so I'm creating VBA functions that I can call from a worksheet.
But...when I have multiple inputs going into a function, is there a way to remind the user which input comes next in the same way that Excel does with built-in functions?
For example, when you type in =PMT( Excel brings up the helper text so you know that the order of inputs is (rate, nper, pv, etc....
Is there a way to bring up that same helper text in my own function? So if I have up, down, right, left as inputs and give the spreadsheet to someone else, they can see it's up, down, right left and not right, left, up, down .
View 4 Replies
View Related
Aug 14, 2014
If numbers has been pasted in as text I cant convert them after. It convert the text to numbers and after it make a custom format with 5 zeroes.
I would really like to have the possibility to set the range with a input box and after set the numbers of zeroes/digits I want to have there. But have had problem put it in the code.
Have a look at the code below I have also pasted a test sheet to work with.
[Code] .....
Attached File : Testconvert.xls‎
View 4 Replies
View Related
Jun 15, 2009
I have been using a specific macro for at least 2 years now without incident...
but today for some reason I am get an error: ....
View 10 Replies
View Related
Jun 1, 2007
I was wanting to input the date Before Printing. I want to write some code.
Private Sub Workbook Before_Print (cancel as booleen)
Inputbox = "Enter the date you would like in Mondays cell C4"
Application.Worksheet.Range("C4").Value = InputBox.Value
PrintDialogBox.Show
End Sub
I know I am making a very rough attempt at what I am trying to achieve, I just don't know coding that well.
View 9 Replies
View Related
Sep 2, 2006
Is it possible to get a inputbox to validate an entry as time in the format of HH:MM
ie: user must enter a valid time in the above format before the macro will proceed to the next line of code
View 7 Replies
View Related
Apr 22, 2014
1. I need a template that allows a user to select a location from a dropdown menu (Cell B1 of Example Data tab).
2. Titles in cells C1:V1 and B2:B8 will stay the same.
3. Data inputs within range C2:V8 would change for each location. The idea is based off the location selection from the dropdown menu, different data is shown within the range and available for updates.
4. The chart (see Example Chart) would sum all location inputs in range C2:V8
View 3 Replies
View Related
Sep 22, 2013
I want to create a macro to take multiple inputs from sheet 2, apply them simultaneously to the inputs on sheet 1, take sheet 1's output and list next to the inputs on sheet 2. I want to apply this to a spreadsheet with complicated calculations. Example spreadsheet attached. Related Macros I have will do a similar thing but only take one input at a time. Code as follows.
VB:
Sub x()
Dim r As Range
With Sheet2
For Each r In .Range("A2", .Range("A2").End(xlDown))
Sheet1.Range("A2") = r
r.Offset(, 2).Resize(, 3).Value = Sheet1.Range("C2:E2").Value
Next r
End With
End Sub
View 5 Replies
View Related
Apr 1, 2009
I have a spreadsheet of courses required to reach a certification. On this spreadsheet I have listed the number of hours required for each course in one column, and how many hours I have accrued in an adjoining column. Not all the hours will occur at once, so I tend to bound from cell to cell adding hours in small amounts. What I am trying to do is create a macro that will allow me to add to the existing number of hours to the newly accrued hours, without typing over what is already there.
For example…Class 1 requires five hours total, and I have two hours accrued. If I accrue two more hours (for a total of four hours) I want to update cell E2 without going in to this cell manually and changing this number. I would like to enter the additional two hours in a text box or similar function, and have that function update E2. To add to the level of difficulty, there are four levels of class. This means not only do I need to be able to select which class hours need updated, but which level of class. I have attached the spreadsheet I am working with to try to make things a little clearer.
View 2 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
Jan 15, 2010
I have made a dynamic calculator which will calculate the total sale based on 3 criteria in 3 different cells as follows:-
I would like to derive the sales qty in cell C5 if all the 3 conditions in the range B2:B4 is true.
In this case the sales qty for Style-Colour-MRP combination(9103-PINK-399) should be 6.
I am unable to figure out with the formula for the same....
View 9 Replies
View Related
Apr 25, 2013
I have 4 columns, If column B (Ref No) is filled in, the adjacent columns, C,D and E become mandatory and an input box pops up on screen one after the other for entry into each column.
My problem is that I require a drop down list and not a input box for the final column (status). So i have created a userform with a combobox dropdown. I am having problems connecting the combobox selection to the final column, and for the selected combobox item to go into the right cell like the input box entry currently does.
Attachment 53209test743.xls
I have attached a sheet and also you can see the code below.
Code in Sheet
VB:
Public SaveVal1
Public SaveVal2
Public SaveVal3
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
[Code] .....
View 3 Replies
View Related
Jun 23, 2006
I am writing a module which have a different test based on for each of the previous 2 column cells. It calculate the days passed or in simple way calculate the date difference for the 2 columns and puts them in third. But i need to use a inputbox for entering the first date for monday of the month each time i use the worksheet.
When i try using the module for each cell of the column it display the input box for each cell. is there any way so that i just enter the value in input box and it can be used in rest of the module.Without using it again and again.
View 8 Replies
View Related
Mar 13, 2014
I want to to copy selected columns of sales data into rows organized by salesperson. I have just started out with VBA and find that I cannot do it myself.
My original data are in the form of the following:
invoice_no
product
sales
qty
total
[Code] .....
I want to display the data in another sheet in the following format:
sales_a
sales_b
sales_c
sales_d
[Code] ...........
View 2 Replies
View Related
Jan 27, 2014
Trying to look up values based on three inputs:
Attached is the file:
Month Input, Column Input and Network Input are changeable based on user input, I am trying to get the desired output based on selection from A20, B20, C20 into cells G20, G21, G22 from row number 2 and corresponding values in H20, H21, H22 from the corresponding row based on the selection.
I have populated an example in the attached file.
View 14 Replies
View Related
Feb 27, 2014
I have 3 tables as per the attached samples (there is more but this is a sample for now).
In the table below these I have what I am trying to do. There is the manual input and the auto output based on the inputs.
e.g. if I input 12 in size, ball in type & A01B in piping class I hope to get the following output 20, 35, 51, 67, 83, 99 in the respective columns.
The formula needs to work across all three tables at the same time.
View 13 Replies
View Related
Mar 11, 2014
I'm trying to compose a date based on inputs from a userform. The user selects the day, month and year in combo boxes, and I want to place this data on a single cell in the format DD/MM/YYYY. How can I do this?
View 1 Replies
View Related
Dec 24, 2006
I've a userform with just textboxes and have written code that checks each textbox in turn to ensure a correct value has been entered. I want to run the code after any changes are made; where then would I insert the code? Userform.click doesn't appear to work nor keypress. Would I have to enter the code in each textbox_afterupdate?
View 9 Replies
View Related
May 20, 2008
I have an excel sheet which acts as a form for multiple users, and I wanted to restrict the way certain cells can be filled in.
For example, if the value in Range E12:E100=PD then the values in Range B12:B100 must be blank. Is there anyway to do something like this?
View 9 Replies
View Related
Mar 8, 2008
how I can ensure that only the letter X can be accepted in a cell? If any other letter or number is typed in the cell or group of cells excel should not accept it & the cell should remain blank?
View 6 Replies
View Related
Jan 20, 2014
I'm familiar with 2d graphs, trendlines, and regression equations. Now I have some tabular data that has 2 input variables and a result. As with my 2d data, I would like Excel to create a polynomial equation of z from the x and y inputs. Can Excel do this, or do I need a plug-in or another software package?
View 12 Replies
View Related
Oct 8, 2008
I am currently using this macro to fill down cells full of numbers which have been passed through formulae. It works for one input (C10), however I want it to work for another input (C11). Im trying to make it fill down the cells after a new set of headings identical to row 12. It has to take into account the rows used for the original fill down which relies on C10. I have tried to use the same macro twice, but I cant get it to do both layers. Basically I need a fill down of layer 1 (already done), and then a fill down for layer 2 after layer 1.
View 2 Replies
View Related
Jul 20, 2009
I am not new to excel - but I have never required the use of advanced excel features before today - so I apologize in advance. I am a health professional student (graduate level) assisting my preceptor in developing patient management mechanisms.
I am building an excel spreadsheet to manage current medications for several patients.
I have built the spreadsheet with the first 'sheet' being a directory and subsequent sheets being patient data files(one sheet per patient).
I am now in the process of creating a macro to build new patient data files (a new sheet for a new patient). I recorded a macro to build the new sheet with the proper formatting of information. What I am trying to do now is automate the naming and linking of the new sheet.
What I am really after is how can you create a "prompt" such that after activating the macro button it asks:
Patient last name:
Patient first name:
Then uses this data to:
1. Rename the newly made sheet to 'last, first'
2. Title the newly made sheet with 'last, first'
3. Create an entry in the directory in the 'last, first' format
4. Finally, build the hyperlink from the directory to the newly created sheet
View 11 Replies
View Related