Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19

Thread: Add next sequence number in next blank row cell only..Excel VBA program

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

    Default Re: Add next sequence number in next blank row cell only..Excel VBA program

    Thanks Rick for your prompt reply. It is working..👍

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

    Default Re: Add next sequence number in next blank row cell only..Excel VBA program

    Can you please advise following macro

    Row 1 to 5 in column A is filled with some text.
    Row 6 in same column is empty..
    Row 7 to 10 in same column is filled with some text
    Row 11 in same column is empty..vice versa

    I want a macro that fill all blank column (6, 11, etc) with text “AAA”. Please help

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

    Default Re: Add next sequence number in next blank row cell only..Excel VBA program

    Quote Originally Posted by Akash030193 View Post
    Can you please advise following macro

    Row 1 to 5 in column A is filled with some text.
    Row 6 in same column is empty..
    Row 7 to 10 in same column is filled with some text
    Row 11 in same column is empty..vice versa

    I want a macro that fill all blank column (6, 11, etc) with text “AAA”. Please help
    Please help

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

    Post Re: Add next sequence number in next blank row cell only..Excel VBA program

    In continuation with above macro, I want to update sequence number as A B C D....next blank row to be filled with next sequence number, if

    For example,
    ColumnA
    1 A
    2
    3 A
    4
    5 A
    6 A
    7
    8 A
    9
    10 B
    11
    12 A
    Answer to be..
    ColumnA
    1 A
    2 B
    3 A
    4 B
    5 A
    6 A
    7 B
    8 A
    9 B
    10 B
    11 C
    12 A

  5. #15
    MrExcel MVP Rick Rothstein's Avatar
    Join Date
    Apr 2011
    Location
    New Jersey, USA
    Posts
    35,232
    Post Thanks / Like
    Mentioned
    92 Post(s)
    Tagged
    33 Thread(s)

    Default Re: Add next sequence number in next blank row cell only..Excel VBA program

    Quote Originally Posted by Akash030193 View Post
    Can you please advise following macro

    Row 1 to 5 in column A is filled with some text.
    Row 6 in same column is empty..
    Row 7 to 10 in same column is filled with some text
    Row 11 in same column is empty..vice versa

    I want a macro that fill all blank column (6, 11, etc) with text “AAA”. Please help
    Will any blanks after the last filled cell need to have "AAA" placed in them? If so, what can be used to determine the last row that fills will need to go down to?
    Rick's "mini" blog... http://www.excelfox.com/forum/f22/
    .
    Want to post a small screen shot? See Part B here.

  6. #16
    MrExcel MVP Rick Rothstein's Avatar
    Join Date
    Apr 2011
    Location
    New Jersey, USA
    Posts
    35,232
    Post Thanks / Like
    Mentioned
    92 Post(s)
    Tagged
    33 Thread(s)

    Default Re: Add next sequence number in next blank row cell only..Excel VBA program

    Quote Originally Posted by Akash030193 View Post
    In continuation with above macro, I want to update sequence number as A B C D....next blank row to be filled with next sequence number, if

    For example,
    ColumnA
    1 A
    2
    3 A
    4
    5 A
    6 A
    7
    8 A
    9
    10 B
    11
    12 A
    Will the number of blanks between letters always only be one cell or could there be multiple blank cells between letters that need to be filled in?
    Rick's "mini" blog... http://www.excelfox.com/forum/f22/
    .
    Want to post a small screen shot? See Part B here.

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

    Post Re: Add next sequence number in next blank row cell only..Excel VBA program

    Quote Originally Posted by Rick Rothstein View Post
    Will the number of blanks between letters always only be one cell or could there be multiple blank cells between letters that need to be filled in?

    Yes, number of blanks between letters always be one cell.

  8. #18
    MrExcel MVP Rick Rothstein's Avatar
    Join Date
    Apr 2011
    Location
    New Jersey, USA
    Posts
    35,232
    Post Thanks / Like
    Mentioned
    92 Post(s)
    Tagged
    33 Thread(s)

    Default Re: Add next sequence number in next blank row cell only..Excel VBA program

    Give this macro a try...
    Code:
    Sub FillBlanksWithNextSequenceLetter()
      Dim R As Long
      For R = 2 To Cells(Rows.Count, "A").End(xlUp).Row
        If Cells(R, "A").Value = "" Then
          Cells(R, "A").Value = Chr(Asc(Cells(R - 1, "A").Value) + 1)
        End If
      Next
    End Sub
    Rick's "mini" blog... http://www.excelfox.com/forum/f22/
    .
    Want to post a small screen shot? See Part B here.

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

    Thumbs up Re: Add next sequence number in next blank row cell only..Excel VBA program

    Quote Originally Posted by Rick Rothstein View Post
    Give this macro a try...
    Code:
    Sub FillBlanksWithNextSequenceLetter()
      Dim R As Long
      For R = 2 To Cells(Rows.Count, "A").End(xlUp).Row
        If Cells(R, "A").Value = "" Then
          Cells(R, "A").Value = Chr(Asc(Cells(R - 1, "A").Value) + 1)
        End If
      Next
    End Sub
    thank you very very much
    It’s working

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
  •