Results 1 to 3 of 3

Selecting a strip of values in a column

Threaded View

sapphire Selecting a strip of values... 06-03-2008, 03:05 PM
jtp Hi, Try this out. ... 06-03-2008, 10:06 PM
jindon Assuming the list is isolated... 06-03-2008, 10:31 PM
  1. #1
    Registered User
    Join Date
    05-23-2008
    Posts
    20

    Selecting a strip of values in a column

    Hey guys,
    Please look at the attachment to see my table.
    I'm trying to write some code to iterate through the columns and select all the rows that have the info and paste by values later. I hardcoded the row values now but number of rows can change in the future. However, the new rows will be added between the "Dev't" and "Other" rows.

    So I want m program to count the number of rows between "Dev't" and "Other" and copy all the contents in between.

    here's the code I have so far:

    
       iLastCol = ws.Cells(27, Columns.count).End(xlToLeft).Column
    
       For i = 2 To iLastCol
    
           If Cells(27, i) <= Date Then
               range(Cells(28, i), Cells(41, i)).Copy
               range(Cells(28, i), Cells(41, i)).PasteSpecial xlPasteValues
               
           End If
    
       Next i
    Attached Images Attached Images

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1