$$Excel-Macros$$ Delete the Rows Between the Last Row in Column A and the Last Row of Column B

2012-03-09 Thread Johnny
For example: The last row of data in column B is row 20. The last row of data in Column C is 30. I'm trying to delete rows 21 through 30. The script is bombing on the rows.select line saying Run time error 13, type mismatch My code attempt: -- Sub cleanup7() Dim lastrowB

Re: $$Excel-Macros$$ Delete the Rows Between the Last Row in Column A and the Last Row of Column B

2012-03-09 Thread dguillett1
try Rows(lastrowB : lastrowC).Delete or Rows(lastrowB).resize(lastrowC-lastrowb).Delete Don Guillett Microsoft MVP Excel SalesAid Software dguille...@gmail.com -Original Message- From: Johnny Sent: Thursday, March 08, 2012 7:08 PM To: MS EXCEL AND VBA MACROS Subject:

Re: $$Excel-Macros$$ Delete the Rows Between the Last Row in Column A and the Last Row of Column B

2012-03-09 Thread Johnny
Hi Don, thanks for responding. I inserted one of your examples: Rows(lastrowB : lastrowC).Delete and I'm getting Compile Error Syntax Error. I tried moving around the and such, but couldn't figure it out. Thanks Johnny On Mar 9, 3:13 pm, dguillett1 dguille...@gmail.com wrote: try

Re: $$Excel-Macros$$ Delete the Rows Between the Last Row in Column A and the Last Row of Column B

2012-03-09 Thread dguillett1
I just tested these . Test these and then change select to delete Rows(lastrowB : lastrowC).Select or Rows(lastrowB).Resize(lastrowC - lastrowB + 1).Select Don Guillett Microsoft MVP Excel SalesAid Software dguille...@gmail.com -Original Message- From: Johnny Sent: Friday, March