ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Deleteing Rows (https://www.excelbanter.com/excel-programming/310490-deleteing-rows.html)

Michael Vaughan

Deleteing Rows
 
Hello Everyone,

Does anybody know how I can delete a whole row, PLUS keep the other rows
with good data?? I cut and paste my schedule, but the rows very on data
that I need to keep with my schedule. Like below, I need to keep the row
with the dates such as 0927 and 0928 (plus I need to know how to convert
that to a date), and then I need to get rid of the rows that have "Duty
Info". This way I can import it to my Outlook program.

0927 0109 PIT MDW 19:15 19:47 325 01:32 01:32
0927 0109 MDW LAX 21:20 23:38 325 04:18 04:18
Duty Info L23:06 R18:15 E23:53 Duty 05:50 05:50 08:38
0928 0102 LAX IND 23:49 05:44 312 03:55 03:55
Duty Info R22:49 E05:59 Duty 03:55 03:55 05:10
Sked/Act Credit 22:00/ 22:00




Tom Ogilvy

Deleteing Rows
 
Sub DeleteDutyInfo()
Dim rng as Range
set rng = Cells.find("Duty Info")
if not rng is nothing then
rng.EntireRow.Delete
set rng = cells.find("Duty Info")
Loop while not rng is nothing
End Sub

--
Regards,
Tom Ogilvy



"Michael Vaughan" wrote in message
...
Hello Everyone,

Does anybody know how I can delete a whole row, PLUS keep the other rows
with good data?? I cut and paste my schedule, but the rows very on data
that I need to keep with my schedule. Like below, I need to keep the row
with the dates such as 0927 and 0928 (plus I need to know how to convert
that to a date), and then I need to get rid of the rows that have "Duty
Info". This way I can import it to my Outlook program.

0927 0109 PIT MDW 19:15 19:47 325 01:32 01:32
0927 0109 MDW LAX 21:20 23:38 325 04:18 04:18
Duty Info L23:06 R18:15 E23:53 Duty 05:50 05:50 08:38
0928 0102 LAX IND 23:49 05:44 312 03:55 03:55
Duty Info R22:49 E05:59 Duty 03:55 03:55 05:10
Sked/Act Credit 22:00/ 22:00






Bill Kuunders

Deleteing Rows
 
Michael
Try to do a sort first (data....sort...sort by column A) so that all the
rows with duty info are in one group.
You can then highlight the rows by selecting the row numbers left click and
drag down. right click and select "delete"
To make a date from your 0927 may be more complicated. It looks like the
cell is formatted as text.
You will have to split the day from the month using functions such as
=right(a3,2) and work with the results.

Regards
Bill K

"Michael Vaughan" wrote in message
...
Hello Everyone,

Does anybody know how I can delete a whole row, PLUS keep the other rows
with good data?? I cut and paste my schedule, but the rows very on data
that I need to keep with my schedule. Like below, I need to keep the row
with the dates such as 0927 and 0928 (plus I need to know how to convert
that to a date), and then I need to get rid of the rows that have "Duty
Info". This way I can import it to my Outlook program.

0927 0109 PIT MDW 19:15 19:47 325 01:32 01:32
0927 0109 MDW LAX 21:20 23:38 325 04:18 04:18
Duty Info L23:06 R18:15 E23:53 Duty 05:50 05:50 08:38
0928 0102 LAX IND 23:49 05:44 312 03:55 03:55
Duty Info R22:49 E05:59 Duty 03:55 03:55 05:10
Sked/Act Credit 22:00/ 22:00







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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com