I am trying to dynamically select the range on a worksheet based on the cell not being blank but the last row of my data is a totals row. I can figure out how to get my data but I can not figure out how to reduce the selection by 1 row so that the totals row is not included.
My data starts in A4 and in the example I am using, the last cell with data is J128, but row 128 is the totals row. This will change based on the week/month and worksheet I run this on, so it needs to be able to find the end by itself.
Either...
Range("A4").Select
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
Or...
Range(("A4"), Range("j65536").End(x1Up)).Select
seem to get me the selection of data that includes the total row. How do I get it to move the selection 1 row higher?
thanks!
My data starts in A4 and in the example I am using, the last cell with data is J128, but row 128 is the totals row. This will change based on the week/month and worksheet I run this on, so it needs to be able to find the end by itself.
Either...
Range("A4").Select
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
Or...
Range(("A4"), Range("j65536").End(x1Up)).Select
seem to get me the selection of data that includes the total row. How do I get it to move the selection 1 row higher?
thanks!