PC Review


Reply
Thread Tools Rate Thread

Delet certain row in a sheets in workbook

 
 
Arne Hegefors
Guest
Posts: n/a
 
      5th Dec 2007
Hi! I have a big excel workbook with lots of sheets. In most sheets in column
A I have a list of dates. The rest of the columns contains values
corresponding to that date. Now sometimes there is a problem with the numbers
for a certain date. Then I want to be able to delete that particular row (for
that date) in every worksheet. Since there are so many it takes alot of time
to do manually. Does anyone have any idea on how to do this? thanks!
 
Reply With Quote
 
 
 
 
carlo
Guest
Posts: n/a
 
      5th Dec 2007
Hi arne

what do you mean by:
"Now sometimes there is a problem with the numbers for a certain
date."

is the date wrong, or is some other field wrong?

to give you a start for your code:

dim sh_ as worksheet

for each sh_ in activeworkbook.sheets
for i = sh_.cells(65536,1).end(xlup).row to 1 step -1
if sh_.cells(i,1).value = WRONG 'this is the line
'you have to change according to your problem
sh_.rows(i).delete
end if
next i
next sh_

hth

Carlo

On Dec 5, 5:45 pm, Arne Hegefors
<ArneHegef...@discussions.microsoft.com> wrote:
> Hi! I have a big excel workbook with lots of sheets. In most sheets in column
> A I have a list of dates. The rest of the columns contains values
> corresponding to that date. Now sometimes there is a problem with the numbers
> for a certain date. Then I want to be able to delete that particular row (for
> that date) in every worksheet. Since there are so many it takes alot of time
> to do manually. Does anyone have any idea on how to do this? thanks!


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Delet Sheets with out Automation Error rogge Microsoft Excel Programming 5 14th Jan 2009 04:13 PM
How to repeat a code for selected sheets (or a contiguous range of sheets) in a Workbook? Dmitry Microsoft Excel Discussion 6 29th Mar 2006 12:43 PM
How to repeat a code for selected sheets (or a contiguous range of sheets) in a Workbook? Dmitry Microsoft Excel Programming 6 29th Mar 2006 12:43 PM
How to repeat a code for selected sheets (or a contiguous range of sheets) in a Workbook? Dmitry Microsoft Excel Worksheet Functions 6 29th Mar 2006 12:43 PM
Macro for filter on protected workbook that works for all sheets, no matter what sheets are named? StargateFanFromWork Microsoft Excel Programming 6 26th Jan 2006 06:31 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:11 AM.