Results 1 to 10 of 10

fill formula down to the last row in every inserted columns and clear the error value

Threaded View

  1. #1
    Registered User
    Join Date
    10-16-2012
    Location
    japan
    MS-Off Ver
    Excel 2003
    Posts
    18

    fill formula down to the last row in every inserted columns and clear the error value

    Hi guys,

    I tried to insert columns every two column i.e. column A, D, G...last column and fill it down with the formula to the last row, which suppose to make it faster and clear the error value from the formula.
    I have been thinking something like this, but do not know how to define the last column and last row to make the formula work.

    With range
    For i = lastcolumn - 1 To 1 Step -2
      For r = 1 To .Rows.Count
        ws.Columns(i).Insert
        Range("i" & r).FormulaR1C1 = "=LEFT(RC[1],FIND("":"",RC[1])-0)"
      Next r
    Next i
    End With
    
    Cells.Replace What:="#VALUE!", Replacement:="", LookAt:=xlPart, _
            SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
            ReplaceFormat:=False
    I thank you in advance for your help.
    Last edited by JBeaucaire; 02-10-2013 at 01:57 AM. Reason: Added code tags, as per forum rules. Don't forget!

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