+ Reply to Thread
Results 1 to 10 of 10

Checking row for duplicates, and also accepting integers and get the "B" + int value

  1. #1
    Registered User
    Join Date
    10-29-2014
    Location
    Temse, Belgium
    MS-Off Ver
    2010
    Posts
    18

    Checking row for duplicates, and also accepting integers and get the "B" + int value

    hello guys,

    I'm currently working on a piece of code that looks like this

    Please Login or Register  to view this content.
    So as it is now when i insert a duplicate value in row C and only row C; it gives me a message and clears out the cell

    I would like for it to also accept an integer from 1-1000 and then it should fetch the value out of another excel file in cell ' B + given integer' AGAIN only in row C

    any thoughts ?

    thx

  2. #2
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Checking row for duplicates, and also accepting integers and get the "B" + int value

    How about this? I don't really like the idea of using a loop, so I changed that.

    Please Login or Register  to view this content.
    多么想要告诉你 我好喜欢你

  3. #3
    Registered User
    Join Date
    10-29-2014
    Location
    Temse, Belgium
    MS-Off Ver
    2010
    Posts
    18

    Re: Checking row for duplicates, and also accepting integers and get the "B" + int value

    Thx for the reply, when you enter an integer it also should look for duplicate names associated with the reference since you have the duplicate search in the else i don't think this applies; also i don't know how to extract the information in a different excel file (not different sheet) with this kind of structure
    Please Login or Register  to view this content.
    I can't test the code before i have this last part down; do i make an absolute path or what?
    thx for the help !

  4. #4
    Registered User
    Join Date
    10-29-2014
    Location
    Temse, Belgium
    MS-Off Ver
    2010
    Posts
    18

    Re: Checking row for duplicates, and also accepting integers and get the "B" + int value

    bump no response

  5. #5
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Checking row for duplicates, and also accepting integers and get the "B" + int value

    Quote Originally Posted by Sydstar View Post
    bump no response
    Really? You took 1 hour and 24 minutes to respond to my post, but post a 'bump no response' after only 49 minutes? In case you're wondering, most helpers (I don't want to entirely exclude the possibility of aliens) on this forum are just normal humans, like yourself, possibly holding a full time job, as well as are packed with any other schedules in life. Don't expect instant responses please.

    Quote Originally Posted by Sydstar View Post
    when you enter an integer it also should look for duplicate names associated with the reference
    You didn't mention that before....

    Quote Originally Posted by Sydstar View Post
    i don't know how to extract the information in a different excel file (not different sheet) with this kind of structure
    My bad on this, I assumed you would know how to do that. Below additional code should handle all that now. Set your file path and sheet name accordingly.
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    10-29-2014
    Location
    Temse, Belgium
    MS-Off Ver
    2010
    Posts
    18

    Re: Checking row for duplicates, and also accepting integers and get the "B" + int value

    I'm sorry mate, I didn't mean no disrespect I didn't expect you'd be answering again, but someone new(btw it's the first thread that gets a response from anyone.. thank you for that). i don't know the tendencies of the forum; i just started programming vba from scratch this week i have a lot of holes in knowledge.

    I have solved the code for what i want but noticed that this code only works if the name or integer gets inserted AFTER the row with the duplicate name.

    for example if jan has been inserted in row 20 and i insert jan in row 10 it doesn't give the message

    I'll wait now :p
    thx in advance

    Please Login or Register  to view this content.
    I should note that this works because i have a commandbutton that already opens the workbook in question next to the active worksheet. and is expected to be open every time a name get's inserted using the integer method
    Last edited by Sydstar; 10-31-2014 at 05:46 AM.

  7. #7
    Registered User
    Join Date
    10-29-2014
    Location
    Temse, Belgium
    MS-Off Ver
    2010
    Posts
    18

    Re: Checking row for duplicates, and also accepting integers and get the "B" + int value

    nevermind I understand your code now and 'fixed it '
    Please Login or Register  to view this content.
    would you change anything about this code ? like the way you make the integer system work; is that better ? or doesn't it matter

    thx for the feedback

  8. #8
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Checking row for duplicates, and also accepting integers and get the "B" + int value

    Edit: Made changes
    Please Login or Register  to view this content.
    Last edited by millz; 10-31-2014 at 06:20 AM.

  9. #9
    Registered User
    Join Date
    10-29-2014
    Location
    Temse, Belgium
    MS-Off Ver
    2010
    Posts
    18

    Re: Checking row for duplicates, and also accepting integers and get the "B" + int value

    ok thx for the help both codes work; now i tried what happened if i didn't open de HR-LIJST.xlsm and an error occured; but after that; i wasn't able to run the code even if the HR-lijst was open.
    nor did it filter the entire names. it looks like the entire code stops working then; i tried the reset button in vba but it doesn't work. only thing that works is reopening the entire excel file..

    grtz,
    sydney

  10. #10
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Checking row for duplicates, and also accepting integers and get the "B" + int value

    That's probably because the events are not started back after error occurred.

    Please Login or Register  to view this content.

    Now in your VBA editor window, press Ctrl + G to bring up the immediate window (should appear somewhere on the bottom). Type in Application.EnableEvents = True and press Enter.

+ 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: 4
    Last Post: 11-17-2013, 12:05 PM
  2. Replies: 1
    Last Post: 07-04-2013, 07:43 PM
  3. Replies: 2
    Last Post: 12-19-2012, 06:47 PM
  4. Replies: 2
    Last Post: 08-17-2012, 05:10 AM
  5. [SOLVED] Continually accepting the "User Agreement".
    By Don in forum Excel General
    Replies: 1
    Last Post: 02-04-2006, 07:35 PM

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