I tried putting user input for deleting number of rows. But I'm not getting idea how to delete it for particular column. Please help
![]()
Please Login or Register to view this content.
I tried putting user input for deleting number of rows. But I'm not getting idea how to delete it for particular column. Please help
![]()
Please Login or Register to view this content.
.
You will need to clarify your goal.
It appears you are searching for a specific term, then want to delete the entire row the term is located on ?
I want to find a column using header name. Then in that column I need to delete specific number of rows. that specific number of rows changes according to the measurements we take here. It can be first rows or seven rows in that particular column. When i run the above macro, it deletes rows in all the column. I want to delete rows in that particular column, it finds.
.
A little clearer ...
When you select the column ... are you then wanting to search for a particular term in that column ? Then you are wanting to delete a specific number of rows below that term / including the row
the term is on ?
Or ....
Are you wanting to select a column ... then select a row number (not search for a term) ... then specify how many rows to delete ?
Sorry for the questions. You can see there what it is you wanting .... all we have is your description to understand.
Oftentimes it helps to provide a mock up of your worksheet with a "before" and "after" view of what is expected.
Thanks
Sorry for not making it clear for you. The below macro is what I wrote in first place. It was giving some error, so idk what to do.
1. Find the column using header name
2. define number of rows needs to be deleted in that column, I don't want to search any term. Just want to delete number of rows from the row where the values start from.
3. While deleting it should delete and shift xlUp only in that column, widout deleting other columns.
![]()
Please Login or Register to view this content.
.
See if this does what you are seeking ...
![]()
Please Login or Register to view this content.
Example workbook attached ...
No , I'm looking for different one. I have attached a macro. Run through steps you will understand. I have mapped start and end point, but could not delete it. the end row is where i need to tell , how much rows that needs to be deleted. If u put 5, it goes to 5th row and map as end address, but could not delete it.
.
This ?
![]()
Please Login or Register to view this content.
.
Slightly edited version. Eliminates one SELECT statement.
![]()
Please Login or Register to view this content.
Thanks for your reply. I used your code for another purpose ( which i needed right on time). But i made what I needed.
Thank you for your support.![]()
Please Login or Register to view this content.
.
You are welcome.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks