I have information entered into a spreadsheet using a user form, each row has a unique user id and a bunch of data and pre-labeled empty columns for future updated information.
I have created another user form that I want to use to update empty columns in the rows as required. I want to be able to enter the unique id into a text box and updated information to populate blank columns into other relevant text boxes and when I hit edit it searches for the relevant unique id and puts the information into the relevant columns of that row.
I do have the clear and close buttons working.
update form.
This is my sample spreadsheet, with empty columns to be populated when updating
sample spreadsheet
And the information currently entered into the spreadsheet is entered by this user form.
enter information
I had previously found something like this on this site, but now cannot find it.
I am super new to this and would not know where to start to create my own cod
Add here the excel sheet sample to see the table structure. The userform for updating records is in the same sheet as the data?
Related
I have set up a set of forms on excel that can append or update information to an access database.
Due to their being multiple forms, I want to create a spreadsheet, which acts as a hyperlink centre to the form the user needs.
Their are only to ‘branches’ of forms the users can use:
Add new data forms
And
Update Existing data forms
Each of these branches has say, 5 forms (so 10 in total)
The spreadsheet I’ve set up has two tabs
Tab 1 - user end sheet (‘user’)
Tab 2 - list and hyperlinks (‘info’)
On the user end sheet there is a list to select which branch of forms the user wants the link to (Cell D11)
Add
Or
Update
From there a secondary dependant drop down list shows the forms available from that branch (Cell D16)
Finally, there is a cell which I’d like to display the hyperlink to the form they have selected.
I’ve searched around a lot, however I can’t find the fix.
The formula in full is:
=IF(user!D16=“”,””,IF(user!D11=“Add”,HYPERLINK(“#”&INDEX(info!$D$9:$E$13,MATCH(user!D16,info!$D$9:$E$13,0)),(VLOOKUP(D16,info!$D$9:$E$13,2,0))),HYPERLINK(“#”&INDEX(info!$G$9:$H$13,MATCH(user!D16,info!$G$9:$H$13,0)),(VLOOKUP(user!D16,info!$G$9:$H$13,2,0)))))
The hyperlink formulas:
HYPERLINK(“#”&INDEX(info!$D$9:$E$13,MATCH(user!$D$16,info!$D$9:$E$13,0))
And
HYPERLINK(“#”&INDEX(info!$G$9:$H$13,MATCH(user!$D$16,info!$G$9:$H$13,0))
The result simply returns #N/A
I’ve tried:
INDEX
“#&INDEX(…)”
“#”&”INDEX(…)”
And knocking all of the if statements out, leaving only the hyperlink function there.
The hyperlinks work fine in the info tab.
Any help would be massively appreciated, thanks in advance.
Solved.
Issue was that the hyperlinks id set up already had a ‘friendly name’, changed to raw link and then was able to replace index match simply with Vlookups.
I am trying to create a code which will be executed with a click of a button in the excel sheet and will ask me for an input of a cell value in excel which will then take all the data from that cell's row and insert it accordingly in the word template where the mail merge tags are.
for example :
I have data like this in my excel sheet :
ID(A1), Name(B1), Last Name(C1), Country(D1), Date(E1)
378232625(A2), John(B2), Smith(C2), United States(D2), 29/02/2020(E2)
322783145(A3), Joshua(B3), Brand(C3), United States(D3), 27/02/2020(E3)
I want to have a button which will ask for an ID input and will then take all the other info of that person and place it in the word template in the correct place.
For example:
When a user runs the code it will pop up an input box and it will ask him to type an ID,
for example: 322783145
it will then check where the ID is placed(which row in A column) in the excel sheet which is A3 for this example and will pull the rest of this person's information into the word template I have created beforehand.(ID, Name, Last Name, Country and Date).
Later on I want to be able to automatically save it to pdf as well with the same button but first I want this to work.
Thanks in advance :D
You don't need VBA for this with the question as originally posted - simply use a SKIPIF field coded as:
{SKIPIF{MERGEFIELD ID}<> {FILLIN "Which ID do you want?" \o}}
or:
{SKIPIF«ID»<> {FILLIN "Which ID do you want?" \o}}
where 'ID' is the name of the data field in Excel you want to the merge to process.
With that, only the record containing that ID will be processed. No VBA required.
Note: The field brace pairs (i.e. '{ }') for the above example are all created in the document itself, via Ctrl-F9 (Cmd-F9 on a Mac or, if you’re using a laptop, you might need to use Ctrl-Fn-F9); you can't simply type them or copy & paste them from this message. Nor is it practical to add them via any of the standard Word dialogues. Likewise, the chevrons (i.e. '« »') are part of the actual mergefields - which you can insert from the 'Insert Merge Field' dropdown (i.e. you can't type or copy & paste them from this message, either). The spaces represented in the field constructions are all required.
I see that you've added two new requirements, viz:
the mailmerge to be run from a button in Excel; and
for it "to be able to automatically save it to pdf as well".
You really shouldn't move the goal posts this way. Nor should you ask ask multiple distinct questions in the same thread. For code to run a merge from Excel (and send the output to PDF), see Run a Mailmerge from Excel, Sending the Output to Individual Files in the Mailmerge Tips & Tricks thread at: https://www.msofficeforums.com/mail-merge/21803-mailmerge-tips-tricks.html. Of course, once you get into using a macro such as this, you will need to add the logic for the ID selection to that code. Ask in a separate thread if you can't figure that out.
I am an Advanced Emergency Medical Technician and am trying to make a user friendly excel workbook to keep track of our inventory on our Ambulance. I want to be able to allow users to add new items to a specific cell range or delete items from specific cell ranges by using a form only as some of the individuals I work with are no were savvy with excel. I would potentially a have sheet with items from every cupboard and at the bottom of every cupboard list have a button that would open a userform that would allow items within a specified named range to be deleted or new items to be added based on a user selecting something like place item above or below the row of an item they have selected. I am currently working from scratch on this one as I cant find anything to even start with.
I'm working on a user form in excel vba. The purpose of the user form is to make data entry more efficient. The data that is being entered is for shoe products. Basically a "parent" of the data is made in one row. The proceeding rows, or what I refer to as children/variations, have the exact same data except certain fields(columns) will be variations of the parent and each variation will have a unique identifier.
For example: say we're entering data for "shoe123". The parent data would be like this
Title Sku
Shoe123 S123
Then the children would be in the row underneath with the same data except the variation size will be tagged at the end of some fields as well as a unique identifier for each variation. Theyd look something like this.
Title Sku
Shoe123 10.5 s123 10.5
Shoe123 11 s123 11
Uniqueid
09876543311
09876543321
So at this point I have been able to enter all the parent data in the form and transfer it to the appropriate column. I'm trying to figure out two things.
How can I code the user form to allow the user to enter the number of variations to create? and then based on the number the user enters, populate that number of combo boxes with pre filled size selections with text boxes next to each combo box to enter the unique identifier?
How would I copy and paste all the parent data with the variation data for each size selected as well as the unique identifier for each variation?
so far I'm thinking I'll need to use arrays for the copy and paste part. I just need some direction. Any help is greatly appreciated!
Thanks Everyone
I understand from your question that you are trying to create a database. If this is correct I would advice you to try and create this in Access. In Access it is a lot easier to link parent data to children. It will also safe you all the time you would need in Excel to code the userforms, etc. as this is (almost) use-ready provided in Access.
If you are determined to create this in Excel, perhaps you could show the vba-code you have so far?
In my Infopath form I use a repeating table. On opening this form on sharepoint I would like to have some rows of the repeating table filled out using information from an other list. I use content types.
What i am working on is a Timesheet system where the user can register how many hours a week he worked on different projects.
I would like that by creation of a timesheet some predefined projects will be already inserted, meaning that the repeating table will have for example 5 rows already with 5 favourite or most used projects selected based on a separate PetProject list.
When I looked at the workflow in the list where the timesheet is being created I couldn’t find the column projectname in the dropdown so I cant give it a value. When I went to look in the Form settings of TimeSheets I saw that projectname cant be selected/edited, its in plain black whereas the other columns are blue and clickable. I thought its probably because the value of projectname is merged from the different rows in the repeating table.
Is there any way I can work around this problem and assign a value to projectname by creation of the timesheet?
Thank you so much!
I think that you will need to write some code to query the data that you are after and add the data to new rows in the repeating table.
There is a loading event that you can hook into to then query a secondary data source and then
add the row to the repeating table.
Will this run with in infopath as a thick client or will it run as a browser based form using infopath form service?