Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default skiping sections in a macro

I am wanting to run a macro to find a certain string of text and I want it to
delete that text if it finds it. Is there any way that I can set it up where
the macro will go to the next section if it does not find what it is looking
for instead of erroring out?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default skiping sections in a macro

Yup, we can help you avoid the error... But post your code so we can see what
you are up to.
--
HTH...

Jim Thomlinson


"Karrisac15" wrote:

I am wanting to run a macro to find a certain string of text and I want it to
delete that text if it finds it. Is there any way that I can set it up where
the macro will go to the next section if it does not find what it is looking
for instead of erroring out?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default skiping sections in a macro

dim FoundCell as range

set foundcell = something.find(....)

if foundcell is nothing then
'do nothing
else
foundcell.entirerow.delete 'or whatever
end if

Notice that there won't be a .activate at the end of that .find(...) line.

Karrisac15 wrote:

I am wanting to run a macro to find a certain string of text and I want it to
delete that text if it finds it. Is there any way that I can set it up where
the macro will go to the next section if it does not find what it is looking
for instead of erroring out?


--

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
Worksheet Sections RJ Excel Discussion (Misc queries) 0 June 7th 07 05:28 PM
Worksheet Sections RJ Excel Discussion (Misc queries) 2 June 7th 07 04:17 PM
sum by skiping one cell Faisal Yameen Excel Discussion (Misc queries) 2 January 23rd 05 05:30 PM
use of sum by skiping one or more cells Faisal Yameen Excel Discussion (Misc queries) 2 January 23rd 05 03:16 PM
use of sum by skiping one or more cells Faisal Yameen Excel Discussion (Misc queries) 1 January 23rd 05 02:56 PM


All times are GMT +1. The time now is 05:10 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"