Trying to make a different version of this code:
Instead of adding a new row I would like it to find the matching Serial (in column A) and have the data replace that row.Please Login or Register to view this content.
Trying to make a different version of this code:
Instead of adding a new row I would like it to find the matching Serial (in column A) and have the data replace that row.Please Login or Register to view this content.
Last edited by nohero; 06-30-2011 at 01:44 PM.
nohero,
Give this a try:
Please Login or Register to view this content.
Hope that helps,
~tigeravatar
Almost where I need to be, there's one small situational glitch. In my actual code the txtSerial isn't input by the user, it's pulled from another cell to show as a label in the userform so it cannot be edited in the userform itself by the user. So my code looks like this:
My problem comes from the format of the source cell "D3". It is in a 5-digit format that can have zeroes to start. The .Find function in the code is not requiring a perfect match. For example, when I have the number 01234 in cell D3 and submit the form it's finding serial 12345 and changing that row because it's searching for "1234" and finds it in the first 4 characters of the 12345 and that one comes first in the list.Please Login or Register to view this content.
How can I make sure the .Find function looks for the complete 5-digit code and only accepts a perfect match even when starting with zeroes?
I tried changing it to .Text but then it finds nothing at all and just creates a new row.
nohero,
Need to add the LookAt:=xlWhole to the .Find() method. Try the following:
Please Login or Register to view this content.
Thanks again! Works exactly as intended!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks