Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Marco that Delete Cells With Specific Text

Please help - I need a macro to clean up a worksheet

Look for in column "A" the word "Created:" then when it is located (even
with the whole string) it will delete the whole cell

Column A
1 Orig ER: Emilio N. Francisco (emilioef)
2 Created: 1/6/2008 6:45:00 AM Scheduled: Yes
3 Eff Date: 01/08/2008 Conf#: 1G5863K App: CLKCCM
4 Recipient: SHIRLEY HEPBURN (4045656) Send Prenote: No
5 SHIRLEY HEPBURN
6 Orig CR: Emilio N. Francisco (emilioef)
7 Created: 1/7/2008 6:44:00 AM Scheduled: No
8 Eff Date: 01/08/2008 Conf#: 1G5861B App: CLKCCM
9 Recipient: DOUGLAS ANDERSON (4043211) Send Prenote: Yes
10 DOUGLAS ANDERSON
11 Orig BR: Emilio N. Francisco (emilioef)
12 Created: 1/5/2008 6:52:00 AM Scheduled: Yes
13 Eff Date: 01/08/2008 Conf#: 1G5862L App: CLKCCM
14 Recipient: JOHN ZALESKY (100274) Send Prenote: No
15 JOHN ZALESKY


Any help would be appreciated.

Chuong Nguyen


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,202
Default Marco that Delete Cells With Specific Text

Does it have to be a macro? Select column A, click Edit/Find (or press Ctrl+F), type Created in the text field, click Find All, select all the rows in the list that is displayed (Ctrl+A will do that), Close the Find dialog and press Delete.

If it needs to be a macro, try this...

Sub ClearCreatedCells()
Dim X As Long
For X = 1 To Cells(Rows.Count, "A").End(xlUp).Row
If InStr(Cells(X, "A").Value, "Created") Then Cells(X, "A").Value = ""
Next
End Sub

Rick


"Chuong Nguyen" wrote in message ...
Please help - I need a macro to clean up a worksheet

Look for in column "A" the word "Created:" then when it is located (even
with the whole string) it will delete the whole cell

Column A
1 Orig ER: Emilio N. Francisco (emilioef)
2 Created: 1/6/2008 6:45:00 AM Scheduled: Yes
3 Eff Date: 01/08/2008 Conf#: 1G5863K App: CLKCCM
4 Recipient: SHIRLEY HEPBURN (4045656) Send Prenote: No
5 SHIRLEY HEPBURN
6 Orig CR: Emilio N. Francisco (emilioef)
7 Created: 1/7/2008 6:44:00 AM Scheduled: No
8 Eff Date: 01/08/2008 Conf#: 1G5861B App: CLKCCM
9 Recipient: DOUGLAS ANDERSON (4043211) Send Prenote: Yes
10 DOUGLAS ANDERSON
11 Orig BR: Emilio N. Francisco (emilioef)
12 Created: 1/5/2008 6:52:00 AM Scheduled: Yes
13 Eff Date: 01/08/2008 Conf#: 1G5862L App: CLKCCM
14 Recipient: JOHN ZALESKY (100274) Send Prenote: No
15 JOHN ZALESKY


Any help would be appreciated.

Chuong Nguyen


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Marco that Delete Cells With Specific Text

thanks so much



"Chuong Nguyen" wrote in message
...
Please help - I need a macro to clean up a worksheet

Look for in column "A" the word "Created:" then when it is located (even
with the whole string) it will delete the whole cell

Column A
1 Orig ER: Emilio N. Francisco (emilioef)
2 Created: 1/6/2008 6:45:00 AM Scheduled: Yes
3 Eff Date: 01/08/2008 Conf#: 1G5863K App: CLKCCM
4 Recipient: SHIRLEY HEPBURN (4045656) Send Prenote: No
5 SHIRLEY HEPBURN
6 Orig CR: Emilio N. Francisco (emilioef)
7 Created: 1/7/2008 6:44:00 AM Scheduled: No
8 Eff Date: 01/08/2008 Conf#: 1G5861B App: CLKCCM
9 Recipient: DOUGLAS ANDERSON (4043211) Send Prenote: Yes
10 DOUGLAS ANDERSON
11 Orig BR: Emilio N. Francisco (emilioef)
12 Created: 1/5/2008 6:52:00 AM Scheduled: Yes
13 Eff Date: 01/08/2008 Conf#: 1G5862L App: CLKCCM
14 Recipient: JOHN ZALESKY (100274) Send Prenote: No
15 JOHN ZALESKY


Any help would be appreciated.

Chuong Nguyen



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Marco that Delete Cells With Specific Text

Another way if you really meant that you wanted to clear the contents of those
cells.

Record a macro when you:
Select column A
Edit|Replace
what: *Created:*"
with: (leave blank)
replace all



Chuong Nguyen wrote:

Please help - I need a macro to clean up a worksheet

Look for in column "A" the word "Created:" then when it is located (even
with the whole string) it will delete the whole cell

Column A
1 Orig ER: Emilio N. Francisco (emilioef)
2 Created: 1/6/2008 6:45:00 AM Scheduled: Yes
3 Eff Date: 01/08/2008 Conf#: 1G5863K App: CLKCCM
4 Recipient: SHIRLEY HEPBURN (4045656) Send Prenote: No
5 SHIRLEY HEPBURN
6 Orig CR: Emilio N. Francisco (emilioef)
7 Created: 1/7/2008 6:44:00 AM Scheduled: No
8 Eff Date: 01/08/2008 Conf#: 1G5861B App: CLKCCM
9 Recipient: DOUGLAS ANDERSON (4043211) Send Prenote: Yes
10 DOUGLAS ANDERSON
11 Orig BR: Emilio N. Francisco (emilioef)
12 Created: 1/5/2008 6:52:00 AM Scheduled: Yes
13 Eff Date: 01/08/2008 Conf#: 1G5862L App: CLKCCM
14 Recipient: JOHN ZALESKY (100274) Send Prenote: No
15 JOHN ZALESKY

Any help would be appreciated.

Chuong Nguyen


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,202
Default Marco that Delete Cells With Specific Text

Sigh! What was I thinking! Here I gave this longish, convoluted mechanical procedure instead of the simple, direct procedure you posted. Sometimes I have to wonder about myself. My only hope is that the OP was after the macro solution and didn't notice.<g Anyway, thanks for following up this thread with your posting.

Rick


"Dave Peterson" wrote in message ...
Another way if you really meant that you wanted to clear the contents of those
cells.

Record a macro when you:
Select column A
Edit|Replace
what: *Created:*"
with: (leave blank)
replace all



Chuong Nguyen wrote:

Please help - I need a macro to clean up a worksheet

Look for in column "A" the word "Created:" then when it is located (even
with the whole string) it will delete the whole cell

Column A
1 Orig ER: Emilio N. Francisco (emilioef)
2 Created: 1/6/2008 6:45:00 AM Scheduled: Yes
3 Eff Date: 01/08/2008 Conf#: 1G5863K App: CLKCCM
4 Recipient: SHIRLEY HEPBURN (4045656) Send Prenote: No
5 SHIRLEY HEPBURN
6 Orig CR: Emilio N. Francisco (emilioef)
7 Created: 1/7/2008 6:44:00 AM Scheduled: No
8 Eff Date: 01/08/2008 Conf#: 1G5861B App: CLKCCM
9 Recipient: DOUGLAS ANDERSON (4043211) Send Prenote: Yes
10 DOUGLAS ANDERSON
11 Orig BR: Emilio N. Francisco (emilioef)
12 Created: 1/5/2008 6:52:00 AM Scheduled: Yes
13 Eff Date: 01/08/2008 Conf#: 1G5862L App: CLKCCM
14 Recipient: JOHN ZALESKY (100274) Send Prenote: No
15 JOHN ZALESKY

Any help would be appreciated.

Chuong Nguyen


--

Dave Peterson



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Marco that Delete Cells With Specific Text

It's always nice to have options!
<bg

"Rick Rothstein (MVP - VB)" wrote:

Sigh! What was I thinking! Here I gave this longish, convoluted mechanical procedure instead of the simple, direct procedure you posted. Sometimes I have to wonder about myself. My only hope is that the OP was after the macro solution and didn't notice.<g Anyway, thanks for following up this thread with your posting.

Rick

"Dave Peterson" wrote in message ...
Another way if you really meant that you wanted to clear the contents of those
cells.

Record a macro when you:
Select column A
Edit|Replace
what: *Created:*"
with: (leave blank)
replace all



Chuong Nguyen wrote:

Please help - I need a macro to clean up a worksheet

Look for in column "A" the word "Created:" then when it is located (even
with the whole string) it will delete the whole cell

Column A
1 Orig ER: Emilio N. Francisco (emilioef)
2 Created: 1/6/2008 6:45:00 AM Scheduled: Yes
3 Eff Date: 01/08/2008 Conf#: 1G5863K App: CLKCCM
4 Recipient: SHIRLEY HEPBURN (4045656) Send Prenote: No
5 SHIRLEY HEPBURN
6 Orig CR: Emilio N. Francisco (emilioef)
7 Created: 1/7/2008 6:44:00 AM Scheduled: No
8 Eff Date: 01/08/2008 Conf#: 1G5861B App: CLKCCM
9 Recipient: DOUGLAS ANDERSON (4043211) Send Prenote: Yes
10 DOUGLAS ANDERSON
11 Orig BR: Emilio N. Francisco (emilioef)
12 Created: 1/5/2008 6:52:00 AM Scheduled: Yes
13 Eff Date: 01/08/2008 Conf#: 1G5862L App: CLKCCM
14 Recipient: JOHN ZALESKY (100274) Send Prenote: No
15 JOHN ZALESKY

Any help would be appreciated.

Chuong Nguyen


--

Dave Peterson


--

Dave Peterson
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
Delete rows with specific text David New Users to Excel 5 April 3rd 23 07:29 PM
Delete Rows Without Specific Text waggett Excel Worksheet Functions 6 October 6th 09 11:34 AM
macro to select cells containing specific text and delete all cells but these JenIT Excel Programming 3 March 27th 06 10:07 PM
Delete specific cells contents in a row with some locked cells in the same row trussman Excel Programming 2 March 1st 05 06:12 PM
Run Specific Marco Budiono[_2_] Excel Programming 1 January 29th 04 04:16 AM


All times are GMT +1. The time now is 11:40 PM.

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

About Us

"It's about Microsoft Excel"