Results 1 to 2 of 2

Thread: Filling missing IDs in column
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    New Member
    Join Date
    Apr 2019
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Filling missing IDs in column

    Hi,
    can anyone help me with this?

    I have in column IDs they look like this:
    A0002
    A0010
    A0003
    Not sorted in any way and some of them are missing. I need to find the blank cells and fill it with what's missing.
    It has to be done using vba.
    Thanks.

  2. #2
    Board Regular James006's Avatar
    Join Date
    Apr 2009
    Posts
    3,362
    Post Thanks / Like
    Mentioned
    19 Post(s)
    Tagged
    1 Thread(s)

    Default Re: Filling missing IDs in column

    Hi,

    With your data in range A1:A3 ... you can test in cell B1 The following array formula :

    Code:
    =IFERROR("A000"&SMALL(IF(ISNA(MATCH(ROW(INDIRECT(MIN(VALUE(SUBSTITUTE($A$1:$A$3,"A","")))&":"&MAX(VALUE(SUBSTITUTE($A$1:$A$3,"A",""))))),VALUE(SUBSTITUTE($A$1:$A$3,"A","")),0)),ROW(INDIRECT(MIN(VALUE(SUBSTITUTE($A$1:$A$3,"A","")))&":"&MAX(VALUE(SUBSTITUTE($A$1:$A$3,"A","")))))),ROWS($1:1)),"")
    Hope this will help

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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