+ Reply to Thread
Results 1 to 11 of 11

check a value in a existing list, if exist increase value

  1. #1
    Registered User
    Join Date
    10-22-2017
    Location
    Montreal
    MS-Off Ver
    2013
    Posts
    5

    check a value in a existing list, if exist increase value

    I need to check a value in a existing list, if the value doesn't exist give extension _00 but if exist increase value by 1 (i.e. _03) in excel.
    Example
    1.- Value to check from the list below WG200-DWG300
    2.- Value to check from the list below AXT-TST400


    ATS-ADS100_01
    ATS-ADS100_02
    ATS-ADS100_03
    WG200-DWG300_00
    WG200-DWG300_01
    WG200-DWG300_02
    WG200-DWG300_03
    WG200-DWG300_04
    WG200-DWG300_05 (1.- this should be the new value added to the list)
    AXT-TST400_00 (2.- this should be the new value added to the list)

    Thanking you in advance.
    Luis

  2. #2
    Forum Contributor shivya's Avatar
    Join Date
    08-19-2017
    Location
    Delhi, India
    MS-Off Ver
    2013
    Posts
    240

    Re: check a value in a existing list, if exist increase value

    I couldn't understand your second condition. Please attach your excel sheet.

  3. #3
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: check a value in a existing list, if exist increase value

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  4. #4
    Registered User
    Join Date
    10-22-2017
    Location
    Montreal
    MS-Off Ver
    2013
    Posts
    5

    Re: check a value in a existing list, if exist increase value

    Sorry, here is a simplify version.
    New Document Number TO BE ADDED WG200-DWG300_00 This Number need to be check on the list below, if it does EXISTS, it needs to be incremented by 1 ("_01") and checked and until it does not exist and added at the end of the list as shown in Red.

    List of existing documents
    ATS-ADS100_00
    ATS-ADS100_01
    ATS-ADS100_02
    ATS-ADS100_03
    WG200-DWG300_00
    WG200-DWG300_01
    WG200-DWG300_02
    WG200-DWG300_03
    WG200-DWG300_04
    WG200-DWG300_05

    Thanks in advance.

    Luis

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: check a value in a existing list, if exist increase value

    With your list commencing in A2, use this in B2, copied down.

    =A2&"_"&TEXT(COUNTIF($A$2:A2,A2)-1,"00")

    If this is not what you need....

    Will you please attach a SMALL sample Excel workbook (10-20 rows of data is usually enough)? Please don't attach a picture of one (no-one will want to re-type all your stuff before starting).

    1. Make sure that your sample data are truly REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired solution is also shown (mock up the results manually).

    3. Make sure that all confidential information is removed first!!

    4. Try to avoid using merged cells. They cause lots of problems!

    Unfortunately the attachment icon doesn't work at the moment. So, to attach an Excel file you have to do the following: Just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  6. #6
    Registered User
    Join Date
    10-22-2017
    Location
    Montreal
    MS-Off Ver
    2013
    Posts
    5

    Re: check a value in a existing list, if exist increase value

    Thanks a lot Glenn
    I have not been able to attached a file, so I have screened capture of the file.
    may be I can email you the file.

    check a value in a existing list.xlsx (the file)
    Microsoft Excel - check a value in a existing list.jpg (the image)

    Thanks in advance for your help.

    Luis

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: check a value in a existing list, if exist increase value

    If the new values are always being added to C2, then this is not possible using a formula. Any formula capturing the value in C2 will always reflect the balue in C2. Change C2, and all vlues linked to the cell change, too. If the next values were to be added in c2, c3, c4, etc, it would be easy.

    You will require VBA to do as you wish. If that is what you want, tell me on this thread and I'll get one of the VBA people here to take a look (I'm hopeless with VBA).

  8. #8
    Registered User
    Join Date
    10-22-2017
    Location
    Montreal
    MS-Off Ver
    2013
    Posts
    5

    Re: check a value in a existing list, if exist increase value

    Thanks Glenn
    It looks like I need VBA because I will be entering a Value on C2 and compare it to the list on column B. If it doesn't exist add it to the end of the list. If it exits incremented by 1 and add it to the end of the list and then sort it.
    So, could you get a VBA person to help me with this?
    Thanking you all in advance.

    Luis

  9. #9
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: check a value in a existing list, if exist increase value

    Hi,

    Perhaps this
    Please Login or Register  to view this content.
    To add the code, right click the worksheet tab, choose View Code and then paste that in.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  10. #10
    Registered User
    Join Date
    10-22-2017
    Location
    Montreal
    MS-Off Ver
    2013
    Posts
    5

    Re: check a value in a existing list, if exist increase value

    Thanks a lot that works very well, but would it be possible to display the result an cell B2?
    Sorry to such a pest.

    check a value in a existing list.xlsm

    Regards

    Luis

  11. #11
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: check a value in a existing list, if exist increase value

    Yes- you need only change this part
    Please Login or Register  to view this content.
    to this
    Please Login or Register  to view this content.

+ 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. check a value in a existing list, if exist increase value
    By lucholac in forum Hello..Introduce yourself
    Replies: 2
    Last Post: 10-23-2017, 05:18 AM
  2. [SOLVED] Check for existing File name, open if exist or open new workbook if not
    By COURTTROOPER in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-09-2017, 12:32 AM
  3. Check if sheet exist based on drop down list
    By oerberg in forum Excel General
    Replies: 3
    Last Post: 03-23-2016, 11:55 AM
  4. [SOLVED] Check First IF Sheet Is Exist With The Name Of Cell K7 If exist Then run the code
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-18-2015, 10:08 AM
  5. open existing file if exist, else create it.
    By simeonmein in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-03-2014, 11:17 AM
  6. [SOLVED] Check data from existing list
    By khannan in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-04-2013, 08:42 AM
  7. Check If Folders in a List Exist
    By fionaby in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-28-2012, 09:32 AM

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