+ Reply to Thread
Results 1 to 4 of 4

Thread: Populate cells to the right of a list

  1. #1
    Registered User
    Join Date
    07-13-2010
    Location
    Barossa SA, Australia
    MS-Off Ver
    Excel 2007
    Posts
    39

    Populate cells to the right of a list

    Hi All,

    I have some code that cleans up same data by writing formulas to the right of the data list. The problem is the code I have is slow as it goes to the very end of the worksheet column and populates all the cells with the formula. Is there a way to just highlight the column to the right of list only base on the lenght of list. There are five different formulas that are added the right of the list as the code goes along, the same problem occurs for each.

    Cheers BJ5352

    Range("D2").Select
        ActiveCell.FormulaR1C1 = "=FIND(""x"",RC[-1])"
        Selection.AutoFill Destination:=Range(Selection, Selection.End(xlDown))
    Last edited by BJ5352; 11-18-2010 at 08:32 PM.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Cochrane,Alberta
    MS-Off Ver
    XL 2003,2007,2010
    Posts
    6,843

    Re: Populate cells to the right of a list


  3. #3
    Forum Guru Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,023

    Re: Populate cells to the right of a list

    Firstly we need all the code, secondly which column is the list in?
    We need more info but based an what you have given this should be fast!
    'Code supplied by Simon Lloyd
    '18/11/2010
    'Microsoft Office Help
    'Excel Conference Poll
    Range("D2").Select
    Application.Calculation = xlCalculationManual
        ActiveCell.FormulaR1C1 = "=FIND(""x"",RC[-1])"
        Selection.AutoFill Destination:=Range("D2:D" & Range("C" & Rows.Count).End(xlUp).Row)
    Application.Calculation = xlCalculationAutomatic
    Not all forums are the same - seek and you shall find

  4. #4
    Registered User
    Join Date
    07-13-2010
    Location
    Barossa SA, Australia
    MS-Off Ver
    Excel 2007
    Posts
    39

    Re: Populate cells to the right of a list

    Thanks Simon, This did the trick prefectly.

    Cheers BJ5352

+ Reply to Thread

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.2.0