LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using ActiveCell to specify a column


In the code below I am stepping through all the cells on the workshee
"Master" and moving certain rows to a worksheet "Complete". Only th
rows that have a value in the H column called "Comp Date" will be move
to the other sheet. How would I specify the column in my If statemen
below? This line is incorrect - If sourceRange.Column(Comp Date). Tha
should give you an idea of what I need.


Code
-------------------
Dim Bcell As Range
Dim sourceRange As Range
Dim destrange As Range
Dim Lr As Long
' I omitted some code that works
For Each Bcell In Worksheets("Master").Range("A2", LastCell)
Set sourceRange = ActiveCell.EntireRow
' the following line is wrong - it needs to refer to column H /Comp Date
If sourceRange.Column(Comp Date) < "" Then 'this line is wrong
Set destrange = Sheets("Complete").Rows(Lr + 1)
sourceRange.Copy destrange
sourceRange.EntireRow.Delete
End If
Next Bcel
-------------------


Thanks for any help

--
David
-----------------------------------------------------------------------
DavidW's Profile: http://www.excelforum.com/member.php...fo&userid=3263
View this thread: http://www.excelforum.com/showthread.php?threadid=57427

 
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
Set ActiveCell at the first column of the same row... Dave Excel Discussion (Misc queries) 2 April 16th 09 08:03 PM
If activecell.column = variable then activecell,offset (0,1) Battykoda via OfficeKB.com Excel Discussion (Misc queries) 1 October 2nd 07 08:05 PM
activecell column to a given range Peter Morris Excel Programming 8 August 4th 06 06:52 PM
How to set ActiveCell to a new column? Carl[_7_] Excel Programming 5 March 17th 05 10:07 PM
Find ActiveCell.column LindaMac Excel Programming 4 November 10th 04 05:48 PM


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