Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA noob help with an IF

Assume us column B to determine the extent of your data

Assume destination is Book2.xls, first worksheet.

Sub CopyTrueRows()

Dim rng as Range, cell as Range
set rng = Range(Cells(1,2),Cells(row.count,2).end(xlup))

for each cell in rng
if cell.offset(0,-1) = True then
cell.EntireRow.copy Destination:= _
workbooks("Book2.xls").Worksheets(1) _
..Cells(rows.count,1).end(xlup)
end if
Next

End Sub
--
regards,
Tom Ogilvy


---
Message posted from http://www.ExcelForum.com/

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
Noob question letmeplay1977 Excel Worksheet Functions 2 October 5th 05 09:27 PM
Noob question Micro_pal New Users to Excel 2 September 4th 05 02:37 PM
Noob question Micro_pal Excel Discussion (Misc queries) 5 September 3rd 05 01:42 AM
Help Im a nOOb. cell formulas. patrick New Users to Excel 1 March 7th 05 10:32 PM
Noob help Patrick Excel Worksheet Functions 3 March 6th 05 07:23 PM


All times are GMT +1. The time now is 09:26 AM.

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"