[VBA Help] Set range to first blank row to last row

  • Hello all:

    I have a VBA code that inserts a blank row after a date condition is met. What i would like to do next, is set the newly inserted blank row and the last row as my new range.

    Could anyone help me out with this?

    Thank you in advance.

  • -- I would then like to run the code below from the last row to the newly inserted row from above--

    For R = Cells(Rows.Count, "C").End(xlUp).Row To (Cells(R, "C").Value) = 0 Step -1  
    If Year(Cells(R, "C").Value) <> Year(Cells(R - 1, "C").Value) Then
  • I couldn't quite figure out what u were trying to do but im assuming 1st code only adds 1 row, second code works after the blank row & puts 2 rows between diff years? have a look

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!