+ Reply to Thread
Results 1 to 20 of 20

Create form to update worksheet

  1. #1
    Registered User
    Join Date
    01-25-2017
    Location
    Worcester
    MS-Off Ver
    2016
    Posts
    93

    Create form to update worksheet

    Hi,

    I was hoping someone could help.

    Attached is a basic form created so that when you enter specific information in the search box and press search it locates the cell on the next worksheet and takes you to it. I need an amendment to this if it's possible.
    What I require is when you enter a number in the search box and press search it doesn't visibly take you to that cell on the spread sheet but it finds the row that that number exists in and creates a message to say number located or if not, no number found.
    Once the number has been located I need 2 more boxes that you can enter more information in that automatically populates cells on the same row that number exists in.
    For example if I enter k0225 it should find that on the SIMS worksheet and say number located. I want to then enter a name in the 1st new box "Peter Parker" which will enter this into column D on the same row. Then enter 07895412365 into the 2nd box which will enter this into cell C on the same row.
    This gives the ability to update cells quickly without having to navigate through thousands of rows of data.

    Please see the attached to work with.

    Let me know if this is possible and if so let me know how or by all means show me.

    Thanks in advance
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    11-04-2018
    Location
    Denpasar
    MS-Off Ver
    Excel 2010
    Posts
    777

    Re: Create form to update worksheet

    Maybe something like this ?

    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Create form to update worksheet

    This assumes that you have 5 Textboxes, Textbox1 to Textbox5
    Please Login or Register  to view this content.

    This Saves An Edited Entry
    Please Login or Register  to view this content.
    This creates a new entry
    Sub Picture4_Click()
    Cells(15, 5).Value = Sheets("SIMS").Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Address
    Picture3_Click
    End Sub
    Last edited by mehmetcik; 11-16-2018 at 06:14 PM.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  4. #4
    Registered User
    Join Date
    01-25-2017
    Location
    Worcester
    MS-Off Ver
    2016
    Posts
    93

    Re: Create form to update worksheet

    Thank you so much Karmapal and Mehmetcik I'm sure these will work but would you be able to add them to the workbook I attached as I'm struggling to get them to work for me and I'm sure it's about how I'm adding the text boxes and the macro to validate against the SIM tab?

    Apologies as you've already done so much.

  5. #5
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: Create form to update worksheet

    Using code above from karmpala - this will get you started
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    01-25-2017
    Location
    Worcester
    MS-Off Ver
    2016
    Posts
    93

    Re: Create form to update worksheet

    Hi Nigelog,

    This works really well thank you.

    It has however given me more ideas of what I would like to happen which is beyond me so I am looking for some kind assistance.

    If you see the attached which now includes Nigelog's solution, I would like the below to happen. Hope this make sense.

    On the SIM number side I need 1 search box rather than 5 and when you enter the SIM number it searches only the column that contains SIM numbers and verifies if it exists. If it exists then the next boxes appear as they do now asking for the additional information which will update the corresponding column cells.
    What I also need is the option if the number doesn't exist then it will enter a new line in the SIM column and then continue with the additional information options filling in the corresponding column cells.

    Then

    On the Phone number side do the same thing but lookup from a column that contains the Phone numbers. The additional info boxes that then appear need to match those from the SIM side.

    What I would also like is the main sheet to be locked down with a password so it can't be manually amended meaning the only way to amend the sheet is by using the form we're creating.

    In addition to this, can there be logic created that does the below.
    If the SIM or Phone number exists - update the corresponding additional columns cells
    If the SIM or Phone number doesn't exist - add new line to the bottom and update the corresponding additional columns cells
    If there are more than one entry of the same SIM or Phone number but all apart from 1 has been struck through then only update the cells of the line that hasn't been struck through. Striking through doesn't have to be the only option, if this doesn't work with that but would work with colouring the line then we can use that option instead as we will be using both striking out and conditional formatting colours.

    I know this is a lot to ask but it would be so valuable to me and a project I am working on I will be eternally grateful. Any further questions then please do ask.
    Attached Files Attached Files

  7. #7
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: Create form to update worksheet

    I forgot that I had done this
    This was a similar project for checking if mobile numbers existed in a database, this will point you in the right direction.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    01-25-2017
    Location
    Worcester
    MS-Off Ver
    2016
    Posts
    93

    Re: Create form to update worksheet

    Hi Nigelog,

    Thanks for this, I see what you're intending to do and it makes sense. I'm not brilliant at this sort of thing so I'm struggling to get anything working the way I would like. My ideal would be your first suggestion but tweaked to include the additional options I listed before.
    Is this possible do you think? Apologies for asking as this probably results in you doing most of the work but you have no idea how appreciative I'll be should we get this working as desired. The impact this will have on our business will be huge.

  9. #9
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: Create form to update worksheet

    Hi
    refresh my memory as to what exactly you require preferably by mocking up what you require in a workbook adding notes if required. Please then attach to a post here.

    The second version I forwarded is far easier to amend and utilize. Can you mock up your requirements in this??
    Then there would only be one search box required as it seems all sims have a letter prefix to the number??

  10. #10
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: Create form to update worksheet

    See if this is nearer
    Attached Files Attached Files

  11. #11
    Valued Forum Contributor dotchiejack's Avatar
    Join Date
    05-21-2015
    Location
    Antwerp,Belgium
    MS-Off Ver
    2016
    Posts
    507

    Re: Create form to update worksheet

    Hi smudgers9,
    Does this work for you?
    I made a userform to do the job.
    I work with a real table in the SIM sheet.
    How does it work?
    Push the button on the cover sheet.
    The userform will open.
    you can make a new record, fill in the fields an push New
    You can change a record, click the right record in the list,make the changes in the fields and push the change button.
    You can striketrough a record,choose the right record in the list and push the Striketrough button.
    You can search by sim number or phone number.
    First make your choise in the combobox and start typing in the field next to the combobox, the records that not match the typed search will be removed out of the listbox.
    You can hide the SIM sheet if you want. If you want to protect the sheet it needs 2 more lines of code.
    Attached Files Attached Files
    Click the * Add Reputation below to say thanks.

  12. #12
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: Create form to update worksheet

    @ dotchiejack - very tidy option

  13. #13
    Valued Forum Contributor dotchiejack's Avatar
    Join Date
    05-21-2015
    Location
    Antwerp,Belgium
    MS-Off Ver
    2016
    Posts
    507

    Re: Create form to update worksheet

    @ nigelog, thanks

  14. #14
    Registered User
    Join Date
    01-25-2017
    Location
    Worcester
    MS-Off Ver
    2016
    Posts
    93

    Re: Create form to update worksheet

    @ dotchiejack - This is almost perfect but I think I might be able to tweak it to take it to the level I need it to be at with the data I have. Really clever piece of work here.

    @nigelog - I liked your effort too but Jacks took my idea to a level I hadn't even though about.

    I really appreciate both of your efforts with this, you're saved me weeks of work and I will now be able to see huge cost savings for my company.

    Thanks again

  15. #15
    Valued Forum Contributor dotchiejack's Avatar
    Join Date
    05-21-2015
    Location
    Antwerp,Belgium
    MS-Off Ver
    2016
    Posts
    507

    Re: Create form to update worksheet

    Hi,
    See second version.
    The search is a lot faster. (compare version 1 and 2)
    I will now be able to see huge cost savings for my company.
    May nigelog an me have a %?
    Attached Files Attached Files

  16. #16
    Registered User
    Join Date
    01-25-2017
    Location
    Worcester
    MS-Off Ver
    2016
    Posts
    93

    Re: Create form to update worksheet

    May nigelog an me have a %?
    HAHA I would love to but I'm not even going to see any of those savings

    You're right though this does work faster, good work. Just a quick request, and I know you've done so much already, but would there be a way to restrict it adding duplicate entries? For example right now I could enter K0206 and press New and it would add a new line but I only want unique entries so could this be restricted so it said "this number already exists" perhaps?

    Also, I've taken a look at the code and I thought I had some clue on how these were put together but I'm struggling to see where to enter code to lock down the SIM sheet and where do I change the code to point to different columns as this is just an example and not using the correct columns and titles?

  17. #17
    Valued Forum Contributor dotchiejack's Avatar
    Join Date
    05-21-2015
    Location
    Antwerp,Belgium
    MS-Off Ver
    2016
    Posts
    507

    Re: Create form to update worksheet

    restrict it adding duplicate entries?
    No problem, I change it tomorrow.
    using the correct columns and titles?
    Can't you post an example that looks like the real sheet but with dummy names ..etc.

  18. #18
    Registered User
    Join Date
    01-25-2017
    Location
    Worcester
    MS-Off Ver
    2016
    Posts
    93

    Re: Create form to update worksheet

    You're too good, I really appreciate it.

    The example is attached.

    I would like to see all the columns using the form but only update the ones listed below.

    A, B, C, E, L, P
    Attached Files Attached Files

  19. #19
    Registered User
    Join Date
    01-25-2017
    Location
    Worcester
    MS-Off Ver
    2016
    Posts
    93

    Re: Create form to update worksheet

    @dotchiejack - Have you had any success with this yet?

  20. #20
    Registered User
    Join Date
    01-25-2017
    Location
    Worcester
    MS-Off Ver
    2016
    Posts
    93

    Re: Create form to update worksheet

    Hi Guys,

    Is there anyone who can continue the great work dotchiejack started and include the additional requirements I listed in my previous post please? I'm getting close to my deadline and would really like to have this working prior to starting the work this is intended for.

    I really appreciate any assistance in advance.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 14
    Last Post: 03-30-2018, 09:45 PM
  2. Update from user form to worksheet code not working
    By aliakbaram85 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-30-2018, 02:57 PM
  3. [SOLVED] Create form to create/update/alter VBA
    By ozstrik3r69 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-29-2017, 01:00 PM
  4. How to create a macro which will fill a 'table' worksheet from another 'form' worksheet
    By tomgnihtemos in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-18-2013, 01:13 AM
  5. Replies: 1
    Last Post: 08-28-2013, 05:04 PM
  6. Update records in a worksheet using a user form
    By crashhold in forum Excel General
    Replies: 3
    Last Post: 05-06-2011, 10:15 PM
  7. Filling form fields via worksheet dropdowns, user update via form, change form color
    By Demosthenes&Locke in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-11-2010, 08:58 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1