Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 128
Default Transfering Data To another Workbook or Sheet

I need to be able to transfer whole rows that contain anything that either
has a value greater than 10 within one column or greater than 250 in another.

When they are transfered, I need them not to overwrite the current data on
that sheet but find the next emtpy rows and place them there.

Hope you can help me


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200510/1
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Transfering Data To another Workbook or Sheet

Dim rng as Range, cell as Range
with worksheets("Sheet1")
set rng = .Range(.Cells(2,1),.Cells(rows.count,1).End(xlup))
End with
for each cell in rng
if rng.offset(0,3) 10 or rng.offset(0,5)<250 then
rng.EntireRow.Copy Destination:=worksheets("Sheet2") _
.Cells(rows.count,1).end(xlup)(2)
end if
Next

rng.offset(0,3) is column D
rng.offset(0,5) is column F

adjust to fit

assumes column A in the source data is always populated.

--
Regards,
Tom Ogilvy


"Crowbar via OfficeKB.com" <u15117@uwe wrote in message
news:5677b9ef328a3@uwe...
I need to be able to transfer whole rows that contain anything that either
has a value greater than 10 within one column or greater than 250 in

another.

When they are transfered, I need them not to overwrite the current data on
that sheet but find the next emtpy rows and place them there.

Hope you can help me


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200510/1



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
Transfering Workbook doss04 Excel Discussion (Misc queries) 3 October 21st 08 11:41 AM
transfering data from one sheet to another(merging) adam Excel Discussion (Misc queries) 1 March 11th 08 11:06 PM
Transfering 100 named ranges to an another workbook Oldjay Excel Discussion (Misc queries) 2 August 8th 07 07:40 PM
transfering data from one sheet to another JDR Excel Discussion (Misc queries) 4 March 7th 07 05:58 PM
Formulas not working after transfering to new workbook Mark Jackson Excel Worksheet Functions 5 December 15th 04 06:17 PM


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