Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default conditional copy of column to another column of same worksheet

Hi,

Please can anyone assist in my requiremnet which is as
I need to copy content of column 32, row 3 onwards to any column
between column 33 to column 256, containning current date.
Column 33 to 256, row 2 , contain dates of all the coming days.
If I am running it today(17-Apr-10), column 32 (AF) ROW 3 onwards
should be copied to any column AI, row 3 onwards.
-------------------------------------------------------------------------------------------------------------------------------------------------------------
COLUMNS AF AH AI
AJ ............................................
IV
Row 1 details blank
row2 16-apr-10 17-apr-10 18-
apr-10...............................................
18-JUL-10
ROW3 Peter
row4 Joy
Row 5 Smith
Row6 kallis
-------------------------------------------------------------------------------------------------------------------------------------------------------------
My earlier code is not working on all the columns, donot know why ?
================================================== ========
Sub vert()
Dim lc As Long, sh As Worksheet, rng As Range
Dim lr As Long, cRng As Range
Set sh = ActiveSheet
lc = sh.Cells(2, Columns.Count).End(xlToLeft).Column
Set rng = sh.Range("C31", sh.Cells(2, lc))
lr = sh.Cells(Rows.Count, 32).End(xlUp).Row
Set cRng = sh.Range(sh.Cells(3, 32), Cells(lr, 32))
For Each c In rng
If c = Date Then
cRng.Copy c.Offset(1, 0)
End If
Next
End Sub
============================================
Regards
sanjay
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
IF conditional to copy column from one spreadsheet to another TagTech Excel Worksheet Functions 4 March 6th 10 12:21 AM
Copy conditional formatting across column in the same row aspoto Excel Worksheet Functions 2 June 28th 09 03:01 PM
how to copy contents of one column to another column in another worksheet yefei Excel Discussion (Misc queries) 3 February 25th 06 05:57 PM
Copy column A and column D from all sheets into new worksheet al007 Excel Programming 1 January 21st 06 10:49 AM
Copy column B and column E from all sheets into new worksheet al007 Excel Programming 2 January 21st 06 07:37 AM


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