#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 68
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 367
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
deleting rows cb New Users to Excel 3 October 12th 07 03:05 PM
deleting rows H. Excel Discussion (Misc queries) 9 May 4th 06 03:22 PM
Help!! I have problem deleting 2500 rows of filtered rows!!!! shirley_kee Excel Discussion (Misc queries) 1 January 12th 06 03:24 AM
deleting hidden rows so i can print only the rows showing?????? jenn Excel Worksheet Functions 0 October 6th 05 04:05 PM
Need help deleting Rows Roberto Excel Discussion (Misc queries) 3 December 9th 04 12:09 AM


All times are GMT +1. The time now is 08:33 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"