Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
deleting rows
Hi,
After opening a txt file all the page header appear after every 31 rows. All exactly the same. I want to create a macro to create a workable sheet, using text to column. I know how to do this, but ... first I want to get rid of all the unnecessary rows ("headers" and "footers"). Using relative cell reference to delete these rows didn't work, because I have to know how often it has to do this. The files vary in length, so this is not possible. Is it possible to have excel find all the values in cell A3 and delete the rows which are the same or contain the same text. If I know how to do this, I'll probably can find out how to go on. Cheers, Harold |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
deleting rows
You can do this:
for i = 4 to cells(65536,1).end(xlup).row if cells(i,1).value = cells(3,1).value then rows(i).delete (xlup) i = i - 1 end if next i hth Carlo On Nov 27, 12:37 pm, mohavv wrote: Hi, After opening a txt file all the page header appear after every 31 rows. All exactly the same. I want to create a macro to create a workable sheet, using text to column. I know how to do this, but ... first I want to get rid of all the unnecessary rows ("headers" and "footers"). Using relative cell reference to delete these rows didn't work, because I have to know how often it has to do this. The files vary in length, so this is not possible. Is it possible to have excel find all the values in cell A3 and delete the rows which are the same or contain the same text. If I know how to do this, I'll probably can find out how to go on. Cheers, Harold |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
deleting rows | New Users to Excel | |||
deleting rows | Excel Discussion (Misc queries) | |||
Help!! I have problem deleting 2500 rows of filtered rows!!!! | Excel Discussion (Misc queries) | |||
deleting hidden rows so i can print only the rows showing?????? | Excel Worksheet Functions | |||
Need help deleting Rows | Excel Discussion (Misc queries) |