Conditional Selection VBA code
Hello everyone,
Anyone know vba (excel) that will let me: 1. go to the last cell in the worksheet 2. select that cell 3. delete everything in the cell 4. then select that cell and everything else if A9 is blank 5. delete the selection 6. SUBTOTAL the last row -- This might seem a little confusing, but let me know if I need to be more specific. ** Any help will be greatly appreciated. Have a good day. -- Himansu |
Conditional Selection VBA code
Himansu,
See comments inline. 1. go to the last cell in the worksheet Define the "last cell in the worksheet" 2. select that cell 3. delete everything in the cell This is fine 4. then select that cell and everything else if A9 is blank Define "everything else" 5. delete the selection 6. SUBTOTAL the last row Why do you want a subtotal on only one row? Cheers, Jason Lepack |
Conditional Selection VBA code
Jason,
1. Last cell = ctrl + g | Special | select "Last cell" 4. "everything else" means: If any cell after a9 is blank then go to that cell and select it while selecting the last cell. This will give me a range. 5. Delete that range and subtotal what I select. ** Do you want me to provide you a template or screen shoot? -- Himansu "Jason Lepack" wrote in message ... Himansu, See comments inline. 1. go to the last cell in the worksheet Define the "last cell in the worksheet" 2. select that cell 3. delete everything in the cell This is fine 4. then select that cell and everything else if A9 is blank Define "everything else" 5. delete the selection 6. SUBTOTAL the last row Why do you want a subtotal on only one row? Cheers, Jason Lepack |
All times are GMT +1. The time now is 12:00 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com