+ Reply to Thread
Results 1 to 15 of 15

Userform code for .find function to adjust cell data

Hybrid View

  1. #1
    Registered User
    Join Date
    09-15-2012
    Location
    London,England
    MS-Off Ver
    Excel 2003
    Posts
    15

    Userform code for .find function to adjust cell data

    Hi All,
    I have a project on going which consists of a database of parts held in a stores, I am stuck on one final issue, which I have searched for, but not really been successful in working out.
    If possible can someone point me in the right direction please.

    I have made a User form to allow the operator to add stock back into the store if they decide they no longer require the part they have previously booked out. The way I thought it would work is to open the form via a command button
    Enter the part no and quantity the wish to put back.Press OK.
    The code will then search a certain row to find the part no. Use the .Offset function to active the 'Quantity' cell and then add +1 to the value
    I think I have managed to work out most of it apart from the searching part.

    Can anyone help, or explain how the .Find function works?

    I have attached the fiile for info.

    Thanks in Advance
    Store file.xlsm


    Dan

  2. #2
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Userform code for .find function to adjust cell data

    Hello creekybones,

    Without Unique Part Numbers, or a Unique Item Identifier, it will just be about impossible. At the moment, for Part Number M5, you have six diffirent Item Descriptions. How do you expect the "User" or the UserForm to "know" where to ad such stock back to. You could easily end up with a mix of all Six different Item Descriptions in one Bin Location.

    You don't want that.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  3. #3
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: Userform code for .find function to adjust cell data

    You can't do that unless you have the user pick the description first... like Winon said

  4. #4
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: Userform code for .find function to adjust cell data

    But I have a different solution! Give me 10min

  5. #5
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: Userform code for .find function to adjust cell data

    I have a solution! I hope
    Give me 5min to work it out hehe

  6. #6
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: Userform code for .find function to adjust cell data

    Ha! I think I did it
    Try this out.
    Attached Files Attached Files

  7. #7
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Userform code for .find function to adjust cell data

    @ stojko89,

    Very nice work! Just an idea, why don't you employ helper columns with Index-Match Formulas to "filter" out irrelevant info, and use that as your list to validate Data entry in the UserForm. That would narrow down the DropDown selections to relative data only.

    Once again. You have done a lot of good work here!

  8. #8
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: Userform code for .find function to adjust cell data

    Winon, thanks
    I Know what you mean. I've used that with the Validation options for cells. But I don't know how to do it for userform.
    Would prorobly need a Combox_Change event I can try... but will need more time. I need to do something for work right now.
    But thats a nice idia though Then actualy there wouldn't have to be if the Manufacturer, Part No and Description exist, because you could only pick what already exists

  9. #9
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: Userform code for .find function to adjust cell data

    @Winon
    So this actualy works as you said.
    But the problem now is if a user selects something in the first combox and then in the second combox and decides to change the first combox the values in the dropdown menu in the second combox will contain the previus selection list and the new selection list.
    Any idias about that?
    Attached Files Attached Files

  10. #10
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Userform code for .find function to adjust cell data

    @ stojko89,

    I have done a revamp on my side as well, and came across the same problem. Still trying to sort that one out! LOL.

    As soon as I get it sorted out I shall send you a copy of my attempt.

  11. #11
    Registered User
    Join Date
    09-15-2012
    Location
    London,England
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Userform code for .find function to adjust cell data

    Guys,
    Thanks for your help and advice of this, I am unable to have a look at what you have done until tonight.
    Just to reply to Winon's first comment, I plan to develope different part no's for all different parts to prevent the issue you have suggested.

    stojko89: Thanks for your work, I will look at tonight.

    This forum is Great!!!

    Cheers

    Dan

  12. #12
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: Userform code for .find function to adjust cell data

    I think I got it! Wait just 5min hehe

  13. #13
    Registered User
    Join Date
    09-15-2012
    Location
    London,England
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Userform code for .find function to adjust cell data

    Hello,
    Had a good play last night, Thanks for your work Stojko89. I have changed it slightly and removed the need to search for the description, so only a partno and manufacture are needed. When I add stock to the stores I shall give them individual part. no.s. The only thing I am looking to do now is to keep the data sorted from A-z, But i think I can do that.

    Again, Thanks for your help in the matter.
    You both deserve a pat on the back!!

    Thanks

    Dan

  14. #14
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Userform code for .find function to adjust cell data

    Hello creekybones,

    Glad we could help in some way, and that your problem is now sorted out.

    @stojko89,

    Thank you for all your help. It was great working with you.

    Stay in touch!

  15. #15
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: Userform code for .find function to adjust cell data

    yeh Winon! You too but still don't know how to work that out hehe, maby someday

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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