Forum Discussion

JoeCavasin's avatar
JoeCavasin
Brass Contributor
Jul 30, 2023

Excel VBA - Define Range of rows from known static range as start to flexible range address as end

Need help with an Excel VBA process.  Below is a screenshot of the current logic with the intended goal noted in the red box.  Can someone assist with helping me set criteria to define the range or rows between a static row (11 - aka RowStart) and one above a flexible end row, with the end row being determined by a cell match?

Copy of file attached as well.  Mod in question is "ModCreateNewUserTEST".  All other Mods are working as intended and do not need changes.

 

  • JoeCavasin 

    That could be

     

    WSN.Range("A11:A" & RowEnd - 1).EntireRow.Select

     

    Do you really need to select those rows? For example, if you want to delete them, you can use

     

    WSN.Range("A11:A" & RowEnd - 1).EntireRow.Delete

Resources