Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default extract with criteria

Dim rw as Long, rng as Range
Dim cell as Range
rw = 2
With activeSheet
set rng = intersect(.columns(4),.usedrange).cells
End with
for each cell in rng
if application.Sum(rng.Resize(1,5)) 0 then
cell.EntireRow.Copy Destination:=worksheets(2).Cells(rw,1)
rw = rw + 1
end if
Next

--
Regards,
Tom Ogilvy

"Samambaia" wrote in message
...
I need to copy several lines from 'sheet 1' to sheet 2' that from column D

to H that the sum(D:H) is greater than zero.

I know this can be done thru filters but the users of this spreadsheet

have very limited Excel knowledge (less than I have :), so I am trying to do
it thru VBA.

Thanks in advance.

Samambaia



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default extract with criteria

Thank you so much !!!
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
Extract specified fields with criteria from Excel.cvs workbook Max Excel Worksheet Functions 0 December 3rd 08 06:56 PM
Extract data on one spreadsheet to another based on criteria AndyJ New Users to Excel 5 January 4th 08 12:43 AM
extract data from table that meets set criteria Aaron Excel Discussion (Misc queries) 1 August 18th 06 05:33 PM
Extract row based on a criteria Mah[_2_] Excel Programming 4 December 17th 03 06:05 PM
How to extract data through ODBC with date criteria? dchow Excel Programming 3 November 21st 03 09:19 PM


All times are GMT +1. The time now is 07:10 PM.

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"