Results 1 to 2 of 2

Column Issue with Range

Threaded View

  1. #1
    Registered User
    Join Date
    03-07-2007
    Posts
    19

    Column Issue with Range

    Thanks in advance for any help.

    I'm doing some importing of excel data from one file to another. That works fine. My problem is that when I get the new data in I have to do some stuff to the data to clean it up. I first declare the variables below and set them
    Public iLastCol As Integer
    Public iLastRow As Integer
    
    iLastCol = Me.Parent.Worksheets("VData").UsedRange.Columns.Count
    iLastRow = Me.Parent.Worksheets("VData").UsedRange.Rows.Count
    This tells me the last column and row with data. I now have to select the column after iLastCol because I have to put a formula into every row in that column. Currently iLastCol = 18 which lands on letter R.

    I don't know how to set the Range proptery to allow to select column iLastCol + 1 down to row iLastRow?


    Prior to me switching to using column numbers the VBA code looked like this

    Worksheets("Sheet1").Range("S2:S" & iLastRow).FormulaR1C1 = "=IF(ISERROR(SEARCH(R1C,RC[-17],1)) = FALSE, ""X"","""")"
    Thank You for your help
    Last edited by royUK; 05-12-2008 at 01:35 AM.

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